Kevin Dente's Blog

The Blip in the Noise
Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine

After I installed Visual Studio 2010 beta 2 (hot off the presses) in a VMWare virtual machine (you don't think I'd be crazy enough to install it on my real machine did you?) I noticed some serious performance problems with the text editor. It was very laggy - couldn't keep up with my typing - and had some visual glitchiness.

I've seen similar problems with WPF apps (including our own, running in VMs before) so I had a sneaking suspicion what a solution might be.  I tried my stock fix, and sure enough the editor became right snappy.

The fix (well known by some, I'm sure) is to disable hardware acceleration by creating the following DWORD registry value:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration

and setting it to 1, as described here. Restart Visual Studio (doesn't even require a reboot) and you should be good to go.

Happy coding!

 

 

Published Monday, October 19, 2009 4:57 PM by kevindente

Filed under:

Comments

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Monday, October 19, 2009 8:20 PM

It's VS2010 or your VM problem?

wyvern

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Monday, October 19, 2009 8:24 PM

Which virtualization software are you using? I would think that it wouldn't be a problem with Windows Virtual PC because I've heard it uses RDP under the hood which if I recall, WPF will render locally.

Of course I could be totally wrong. I am about to install it now on my physical machine which I'm sure I'll be regretting. :)

Josh Einstein

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Monday, October 19, 2009 8:30 PM

As I mentioned, it's VMWare (Workstation 6.5 to be precise). The problem is with WPF apps running on VMWare, not specific to Visual Studio aside from the fact that it's now a WPF app. I don't know if Virtual PC has the same issue, I don't use it.

kevindente

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Monday, October 19, 2009 11:36 PM

Whoops... I have a habit of reading every other sentence in blogs.

Josh Einstein

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Friday, October 23, 2009 4:21 PM

What is the OS you use in your virtual machine?

I want to try VS2010 on a new VM and I'm debating which OS to install as guest.

(In my current dev VM I use VS2008 over Windows Server 2003)

Esto

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Friday, October 23, 2009 9:10 PM

I was using Windows 7 in the VM (as the guest)

kevindente

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Saturday, October 24, 2009 11:07 PM

Kevin, thanks!

This solves the problem for Win7 on VMWare 6.5

Vladimir Syerik

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Saturday, November 14, 2009 3:01 PM

I have VM Ware Fusion 3.0. I don't see Avalon.Graphics in my registry. But I am experiencing the same choppyness. What do I do?

yaip

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Saturday, November 14, 2009 7:12 PM

The Avalon.Graphics key doesn't exist by default, you have to create it.

kevindente

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Saturday, November 14, 2009 9:44 PM

I did that and it worked like a charm. Thank you. Thank you. Thank you.

yaip

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Wednesday, February 10, 2010 6:00 AM

The key was not present in my VM. I have created this and set it to 1. Still did not see any improvement. Any other ideas please??????????

Venki

# re: Visual Studio 2010 Beta 2 editor performance fix running on a virtual machine@ Tuesday, May 18, 2010 5:55 PM

I suspect this hack will be a FAIL for WP7 Emulator work, as Emulator requires WDDM v1.1. Otherwise, it works for me on an old laptop (3 years) with WDDM v1.0.

With my VM guest W7x64 configuration running VS2010 RTMrel look great without the registry hack. But Expression Blend 4 RC fonts can only be read in VM using the registry hack.

mhthomas