Does your Visual Studio run slow?

Recently I’ve been getting pretty annoyed by my Visual Studio 2008, which has been taking longer and longer to do my favorite menu item, Window > Close All Documents. Today was the last straw — I decided 20 seconds to close four C# editor windows really isn’t acceptable for a machine with four gigs of ram, and so I went to look for some fixes.

Here are some of the good ones I found that worked. Use at your own risk of course!

Disable the customer feedback component

In some scenarios Visual Studio may try to collect anonymous statistics about your code when closing a project, even if you opted out of the customer feedback program. To stop this time-consuming behaviour, find this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{2DC9DAA9-7F2D-11d2-9BFC-00C04F9901D1}

and rename it to something invalid:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\Disabled-{2DC9DAA9-7F2D-11d2-9BFC-00C04F9901D1}

(source)

Clear Visual Studio temp files

Deleting the contents of the following temp directories can fix a lot of performance issues with Visual Studio and web projects:

C:\Users\richardd\AppData\Local\Microsoft\WebsiteCache
C:\Users\richardd\AppData\Local\Temp\Temporary ASP.NET Files\siteName

(source)

Clear out the project MRU list

Apparently Visual Studio sometimes accesses the files in your your recent projects list at random times, e.g. when saving a file. I have no idea why it does this, but it can have a big performance hit, especially if some are on a network share that is no longer available.

To clear your recent project list out, delete any entries from the following path in the registry:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList

(source)

Disable AutoRecover

In nearly four years, I have never used Visual Studio’s AutoRecover feature to recover work. These days, source control and saving regularly almost entirely eliminates the need for it.

To disable it and gain some performance (particularly with large solutions), go to Tools > Options > Environment > AutoRecover and uncheck Save AutoRecovery information. (Cheers Jake for the tip)

(source)

August 24, 2009

16 Comments

Ron on September 18, 2009 at 11:38 pm.

Running slow due to development of heavy page size. Any way to hide the gridviews I aren’t working on during development???

Jake Scott on January 12, 2010 at 10:03 am.

You can disable auto recover files.. have a read of the comments on this blog post…

“I’ve opted out of autorecover before. On one of my computers, every 5 minutes the UI would become unresponsive for several seconds because AutoRecover was processing. It was very annoying. So I turned it off.”

http://blogs.msdn.com/saraford/archive/2008/02/14/did-you-know-where-visual-studio-saves-auto-recovered-files-in-the-case-of-an-unexpected-shutdown-151.aspx

Richard on January 12, 2010 at 12:01 pm.

Cheers Jake, added it to the list

Dev1000000 on April 8, 2010 at 2:31 pm.

>>> auto recover files..

You can stop trying to help me now microsoft! A common MS theme is to try to help users too much at the expense of performance and usability. Really needs to be a setting in all MS products for “user level”. If I’m an experienced developer, let me set the “user level” accordingly.

Matt on April 16, 2010 at 10:34 am.

If you find that deleting a file directly from the IDE takes a long time, empty your recycle bin. I have no idea why this only seems to affect an IDE delete but it does make a BIG difference

Neil on June 19, 2010 at 6:51 am.

@Matt – I found this too, but thought it was TortoiseSVN causing the problem.

btw, now I run CCleaner often and it deletes all these temp files and Recycle bin files in one shot.

Khuram on October 14, 2010 at 1:38 pm.

C:\Documents and Settings\Krm\Local Settings\Application Data\Microsoft\..
Remove extra files form this location

Happy Rich on August 27, 2011 at 4:35 pm.

I’m not sure if it’s a good way. Or the right way. But its work for me to make faster
In the Option..
Environment – disabled all allow
Text Editor – General – Disabled Drag and Drop text editing
Project and Solutions – Build and Run – Before Building – Select – Save change to open documents only

Happy Rich on August 27, 2011 at 4:37 pm.

Sorry Environment – only disabled all allow add-in/macro security

Fu-chan on September 9, 2011 at 8:26 pm.

Thanks a lot, I got clean my tem files

Dad El Carbp on February 11, 2012 at 12:37 pm.

All this is just good to keep you inside during winter days.

What you want to do is to delete the .suo file as it get overloaded over time.

Cheers.

Dimitri Dering on October 7, 2013 at 4:09 pm.

Another way of improving performance is the limitation the amount of projects to load and compile. With the free Visual Studio extension Solution Load Filters (available in the visual studio gallery) different load filters can be used for different tasks within one single solution file. Only projects contained in the particular filter are loaded and compiled.

Theodor Zoulias on July 10, 2014 at 3:29 pm.

ReflectedSchemas!
I have just deleted a folder named C:\Documents and Settings\[my name]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas containing 2.6 GB of cached garbage, and now the aspx/ascx files are closing without a 10-20 seconds delay each-and-every-time, for months and years. So many time, so much frustration, so little benefit, so great relief!
Visual Studio 2008 SP1, Windows XP

Nagaraju on July 11, 2014 at 1:59 pm.

Thank you for this tips. It’s Excellent. This Solution really work!!!

Leave a Reply