VS2010 Performance and Bad Video Drivers/Hardware - Redux

Since we shipped Visual Studio 2010 we've continued to have a small but notable series of complaints about performance that we've been able to attribute to bugs in video drivers and GPUs.

The issue first came up back during VS 2010 beta in October of 2009. Since then we've learned that while old, buggy drivers are the usual cause, some newer drivers and GPUs aren't as good at supporting VS's UI as we'd like. (This is also an issue with VMs and VM hosts as Video Virtualization technology isn't very good and requires CPU level TLB virtualization support for decent performance, which most CPUs don't have.)

Fortunately, the software rendering inside WPF is pretty good, so the easy fix here is to force WPF to ignore the GPU and use software rendering (I've tested this on my own system, and I found that WPF's software rendering was actually slightly faster than GPU based rendering on my high end CPU with a mid-range graphics card - your mileage may vary).

But first, if you're seeing slow / broken screen updates you should verify you have the latest display drivers for your system. (See "Guidelines for troubleshooting graphics issues in WPF applications" for more information.)

If that doesn't fix it, then there are three ways to force WPF to use software rendering. 

First and preferred, the final RTM version of VS2010 includes a UI for forcing hardware rendering off - for just VS. With VS2010 open, go to Tools | Options, then select Environment | General (as shown below). Then uncheck "Automatically adjust visual experience..." and "Use hardware graphics acceleration..." 

 

That should be sufficient. 

However, if you want to force software rendering mode for ALL WPF applications (not just VS), you have a second option. Change (or add) one registry key:

 [HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics]

"DisableHWAcceleration"=dword:00000001

Note that this key probably won't exist, and you'll probably need to create it. To turn hardware acceleration back on, just change the "1" to a "0".

A third alternative is to adjust the hardware acceleration options from the display control panel. However, we don't recommend this option as it impacts the entire machine, the details vary by manufacturer, and the exact impact of all the different options is untested.

If you try any of these - let us know how it works for you (DevPerf@Microsoft.com). If it does improve performance, be sure to let us know how much and attach a DXDIAG output so we'll know which video driver / hardware configurations aren't working well.

Regards,

David Berg

Developer Division Performance Engineering Team