Check out my new blog at

Wednesday, March 09, 2011

Visual Studio 2010 Performance Tips

First, just released yesterday, is the Visual Studio 2010 Service Pack I, described here. As of yesterday, it was only available to MSDN subscribers but will be broadly available on March 10th.

Since upgrading all of our projects to VS2010 this past week, I have been struggling with performance and usability issues.  The most vexing problem was my mouse would simply stop working except when clicking into the solution explorer.  All of the code editor windows and the main toolbar\menu would not accept mouse clicks whatsoever until the IDE was restarted.   One of my colleagues recommended locating a new device drive for my mouse.  I did that (and at the same time updated 18 other drivers via this wonderful little tool).  I have quite a few add-ins and extensions so I started disabling them one-by-one.  No luck.  I was in that state this morning and I happened to move the IDE from my secondary monitor onto my primary monitor and whamo, the IDE started accepting mouse clicks.  So, Tip #1, if the IDE stops accepting mouse clicks, try moving it to your primary monitor.

As you probably know, VS2010’s IDE is implemented on WPF, which brings the managed stack into the mix on a scale unlike VS2008.  Many have complained that the use of WPF is a major performance hit in VS2010.  I have read otherwise, but I did notice a gradual degradation of performance over time, especially with many code editor windows open.   Tip # 2 is to learn the shortcut key to force VS2010 to do a garbage collection:

You can marginally decrease startup time and increase performance by creating a shortcut with specific command line arguments as well.  Create a shortcut with these parameters:

C:\Windows\System32\cmd.exe /c start "runhigh" /high "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /nosplash

There is also a performance diagnostic tool available here, but I have not been able to get it working after installing SP1

Finally, there is a good discussion of hardware requirements and other items on Stack Overflow


Content on this site is provided "AS IS" with no warranties and confers no rights. Additionally, all content on this site is my own personal opinion and does not represent my employer's view in any way.