Slow Visual Studio Performance … Solved!

December 7th, 2007 by Kevin Rintoul

I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or clearing Visual Studio’s recent projects list but those suggestions didn’t seem to solve the problem. I remembered that the Windows SysInternals website had a tool called Process Monitor that would sniff registry and file accesses by any running program. It seemed to me that Visual Studio was up to something and Process Monitor should help me figure out what it was. I downloaded the most recent version, and after fiddling around a bit with its display filters, ran it and to my horror, I saw that Visual Studio was so slow because it was accessing the more than 10,000 folders in C:\Users\krintoul\AppData\Local\Microsoft\WebSiteCache on most IDE operations. I’m not sure why there were that many folders and moreover, wasn’t sure what Visual Studio was doing with them, but after I zipped those folders up and moved them somewhere else, Visual Studio’s performance improved tremendously.

The Windows SysInternals website has a number of other useful utilities for network management, security, system information and more. Check it out. I’m sure you’ll find something of value.

Comments

  1. Yordan Georgiev says:

    Hi,
    Thanks for the tip !
    You might want to delete this one also:

    C:\Users\krintoul\AppData\Local\Temp\Temporary ASP.NET Files\siteName

  2. Serge says:

    Thank you for this EXCELLENT solution. My VS was incredibly slow and I was looking for weeks for an improvement. This works!

  3. Imad Marmoud says:

    Hello,

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

  4. Nick Welsman says:

    Ive been searching for this issue for a while as my VS as been running slow ever since install. The problem is I can’t find the AppData folder on my machine?! any help?

  5. Poster says:

    Works for some but not for me?

  6. Bijay Bogati says:

    >>>Nick Welsman

    you can find the AppData by allowing Hidden files and folder to be shown..
    press alt key in any window and go to Tools and go to folder option then go to view and select the 8th line of radio button..

    i hope this will help you!

  7. Bijay Bogati says:

    i also had similar slow problem

    what i did was >>>
    create new project and then copy all form’s content to new project though its risky and could take much time to select and copy content of old form but it worked…

    and after creating and copying the form content save it to other name and delete previous project…

    be careful with this stuff and create some back up before doing… if its worked then only delete older one..

    i hope it work for you too……

  8. storageboy says:

    Ok my solution is very simpel.
    i checked my workingspace ( the location of my projects ) and i realized that i was working on an network storage, where my folders where created.

    so i began a new project on my local storage C:\project
    and not \\server\project

    and its working nicely.

    ( i know its very dumb but maybe it can help)

  9. PS says:

    Thanks! This worked like a charm…now finally I can be more productive with VS 2008. Personally I think VS 2008 is one of the crappiest product Microsoft ever released.

  10. Raj says:

    The only way I know to improve the performance is to disable Edit & Continue option.. Tools -> Options -> Debugging -> Edit & Continue (uncheck the option) & your performance is going to be improved by 200% … :-) Enjoy

  11. Go to OPTIONS>ENVIRONMENT..under Visual Experience, untick “Use Hardware Graphics Acceleration If Available” for some weird reason your dev environment should loosen / speed straight up. Works on all or our laptops. If you have any doubt if yours is on go slow, open up some code and drag the scroll bar up and down fast and will see the slider lags massively behind. When you un-tick it…no lag!

  12. Eddie says:

    Must look into the souloution posted above – this one helped me

    1. To replicate the problem
    a. Start Visual Studio 2010
    b. Create an Empty WindowsForm Application
    c. Press RUN or hit F5
    d. Performance (ie time to show the form) is excessive = 45 seconds!!!!!!!!! Without a single line of code!

    2. To resolve the problem
    a. Goto the Project menu
    b. Application Setting (bottom menu item)
    c. View Window Settings – this will open the XML code window.
    d. Press Run of hit F5
    e. Performance (ie time to show the form) is drastically improved = 1 second (about normal)

    Why the hell that should work I ain’t got a clue but it does.

    Will review the earlier suggestion though

  13. [...] googling, I then find the solution here: delete all the folders named “Temporary ASP.net” on your [...]

  14. Lars says:

    i have a performance issue with my vs2008, too … always my network cable is plugged in, it’s slowly like hell… if i unplug the cable it runs like a beast… i dont know why…

  15. I really like it when people get together and share thoughts.
    Great website, continue the good work!

  16. JSK says:

    The company I work for has synced “My Documents” where you would normally store your Visual Studio projects. After moving my projects out of this folder works like a charm now….no more waiting for a minute or two to just save your work. I think it’s something to do with the sync software that we have which backups your “My Documents” folder to a file server.

  17. Pravin says:

    @Lars, I think by unplugging the cable you are effectively disconnecting from TFS (I am guessing here you use TFS). On our systems, we face performance problems when ever we try to do some TFS activity – get latest, WI list fetching etc.

  18. Ehsan says:

    This work for me.
    Thanks a lot.

  19. Tom says:

    Works like a Champ!!! Thanks a lot to Julian for the tip!

  20. Gaurav says:

    Goto Tools>Options>Environment>Add In Security
    You will see a checkbox with “allow add in components to load” .Just uncheck it. Restart the IDE and check the lightning speed of the IDE now…

  21. franklo says:

    Long path tool is the best solution for your problem. try it and solve your problem.

  22. Hi.. Thanks dear It works..

  23. Haugene says:

    Thanks, this works!

    However, I would also like to mention another way of doing this:

    Use the inbuilt DISK CLEANUP TOOL for Windows, and delete tmp files. Does the job. ;-)

    For the reference. My issue was that the user interface for the Database Explorer in Visual Studio 2012 was horribly slow, even with no project open! Doing a disk cleanup fixed the issue.

  24. Ruud Sikking says:

    Switching from Source to Design in my VS 2012 went very slow.
    The solution of this problem was as follow
    - Click on the down arrow right at the menu option Start (in the standard bar)
    - Select Browse with…
    - Select Internal Web Browser

  25. JImmy Harris says:

    Awesome post… wish I had gone looking for this sooner… what a time saver!!!!

  26. navin kumar says:

    simply re-install visual studio if performance is very slow.
    i achieved same like that.

    Thanks
    Navin

  27. Rajesh S says:

    its a very useful post… great to see the different solutions together …

  28. kanebarrios says:

    You can try by going to vb.exe properties, click Compatibility tab, Now select this option “Disable Desktop Composition”.. This should resolve your problem

  29. Thank you very much, it worked for me!

  30. Daniel says:

    i have a performance issue with my vs2008, too … always my network cable is plugged in, it’s slowly like hell… if i unplug the cable it runs like a beast… i dont know why…

  31. Daniel says:

    i have a performance issue with my vs2010 & 2012, too … always my network cable is plugged in, it’s slowly like hell… if i unplug the cable it runs like a beast… i dont know why…

  32. Dharmesh says:

    Thanks
    its really work for me
    awesome

  33. Adi says:

    Whenever I tried to use my docking station with 2 monitors, VS2010 runs smooth. Whenever I try to operate the VS2010 using just the laptop i.e. not on a docking station , it is UNBELIEVABLY slow.

    I fail to understand how they are related? I also turned off the hardware accelerators. Any suggestions?

  34. Joyce says:

    There is a hotfix released to resolve this issue. Please read through this article

    http://weblogs.asp.net/scottgu/vs-2008-web-development-hot-fix-roll-up-available

  35. Aidan says:

    Hey guys, if none of these work for you try “Tools”-”Options”-”Enviroments and Updates” and disable “Automatically Check for Updates. That worked for me and now Visual Studio is nice and fast :)

  36. Paddy says:

    Great solution, thanks!

Leave a Reply

Trackback to your blog!