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:

http://blogs.msdn.com/b/camerons/archive/2010/12/15/force-vs-to-garbage-collect.aspx

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

http://weblogs.asp.net/kodali/archive/2011/01/24/visual-studio-2010-running-very-slow.aspx

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

3 comments:

Anonymous said...

Hi there, I enjoy reading all of your article post. I
wanted to write a little comment to support you.

Feel free to visit my site ... Saffron X

Anonymous said...

I'm not sure why but this site is loading extremely slow for me. Is anyone else having this problem or is it a problem on my end? I'll check back later on and see if the problem still exists.


Also visit my web page :: Auravie Skin Care Review

Anonymous said...

Right now it sounds like Drupal is the top blogging platform
available right now. (from what I've read) Is that what you are using on your blog?



Raspberry Ketones

Disclaimer

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.