Speeding up Visual Studio 2005

After working intimately with IntelliJ and Eclipse on previous projects, Visual Studio seems like such a beast for doing very simple things. Resharper makes it bearable though has a cost of its own. Our team has been playing around with trying to speed up the responsiveness. Here’s a few things we’ve tried that have worked at least most of the time:

  • Close the Toolbox tab - Even with just the tab closed, VS2005 still seems to use resources to keep it up to date. By removing it from your workspace, the project pane and other windows appear much more responsive.
  • Turn Off Animated Windows - When VS2005 gets sluggish, expanding and hiding tabs can appear horrendously slow as the screen repaints. Turning this option off helped a little bit. Uncheck the box found under Tools … Options … Environment … General … Animate Environment
  • Turn off the VS2005 File Navigator - With resharper installed, you don’t need VS2005 to update the list of methods and fields at the top of the file (CTRL-F12 does this nicely). I’ve hardly even noticed the small panel that sits at the top of the file you’re editing but apparently it takes quite a lot of effort for VS2005 to keep it up to date. Disable the Navigation Bar checkbox under Tools … Options … Text Editor … All Languages … Display.
  • Disable Startup Page - Wondered why VS2005 seemed sluggish on start up? It’s probably because it’s trying to download something from the Internet by default. Turn off the main startup page and the “live” content by unchecking the box found under Tools … Options … General … Startup … “Download content every”. I’d also change the “At Startup” option to “Show Empty Environment”.
  • Install Cool Commands - When you use Track Active Item in the Explorer pane, collapsing projects to run tests of various kinds can be hard. Cool Commands has some helpful things like Collapse All Projects so you don’t have to do it yourself when running tests.

I’d enjoy hearing anything else that anyone else may have tried to continue making VS2005 productive for you.

Comments

  1. JH
    May 31st, 2007 | 3:22 pm

    Thanks for the tips!

    I have used the Disabled Start-up page for years as it has never been of benefit and helps improve load time.

    I wonder if the slowness of VS is a result of not designing for performance and only dealing with performance when it becomes a business-driven issue.

    If there was an alternative to VS (#Develop is awesome and fast[er].. but no resharper support and limited refactoring capability don’t yet make it a viable alternative) I think it would become more pressing for MS management to push the performance stories up in the priority queue. ;)

  2. Dom
    June 3rd, 2007 | 11:30 pm

    The one about the startup page is really here (at least for me in VS2005 SP1):

    Tools … Options … Environment … Startup

    “Download content every”. I’d also change the “At Startup” option to “Show Empty Environment”.

  3. June 4th, 2007 | 6:47 pm

    […] there are some simple tricks that you can do to speed up the UI in Visual […]

  4. Praseeth
    June 5th, 2007 | 4:06 pm

    Removing Properties Tab seems to help,especially if you page has lot of controls.
    AND,don’t forget to install Visual Studio SP1…

  5. June 5th, 2007 | 7:16 pm

    Speeding up Visual Studio 2005

  6. June 6th, 2007 | 7:49 pm

    Other Resources and Research

    Other Resources and Research Content Hosting and Caching CacheFly

  7. Britt
    June 7th, 2007 | 12:54 am

    Wow, I don’t seem to experience these problems. I have visual-paradiem’s SDE (UML modeling) loaded as a plug-in plus all of the things ya’ll mentioned are enabled on mine and I’m running VS Team Suite (for those that don’t know, this version has all versions of the Team System, dev, architect, db, tester).

    I am running on a 32/64 bit Toshiba satellite; 1gb mem; 100gb 7200rpm and a 15.4″ monitor.

    I get quick response when connecting to SS in VS, loading projects, etc.

  8. Mike
    June 7th, 2007 | 4:57 am

    Cool! Now can you do anything to make it so it takes less than 3 minutes to compile my .NET website? :)

  9. June 7th, 2007 | 8:08 am

    Thanks everyone for the tips and comments.

    Dom - I’ve updated where that option is listed as well.

    Praseeth - I’ll definitely try removing the Properties tab as well.

    Britt - Performance is always relative. I work on a large project with multiple projects, and even just building appears slow to me. I’m always trying to improve the edit-build-test loop to increase feedback for the team. Coming from a Java IntelliJ background on a similiar sized project, it’s frustratingly slow.

    Mike - Scott Guthrie has some good tips on optimising ASP.Net compilation though I haven’t tried it out as yet. Check it out here. It might help you out and worth a shot.

  10. June 19th, 2007 | 6:50 am

    VS2005 performance tips

    This post has some good tips for increasing the performance of the VS2005 IDE.

  11. June 25th, 2007 | 3:50 pm

    I would recommend to keep a low number of projects in a solution when it is possible. I experienced some projects having one project per entity and that was a killer at build time and not needed at all when you have the namespace.

  12. June 25th, 2007 | 3:57 pm

    Good article, thanks!

  13. June 25th, 2007 | 6:06 pm

    good tips. I have followed the tip on Properties from before and can tell you it is very very effective. Also removing start up page and page navigator can be helpful.

  14. June 25th, 2007 | 6:21 pm

    Another simple action is to simply minimize it. Since a good chunk of VS is written in unmanaged code, it takes up a lot of memory over time that doesn’t get released often enough.

  15. June 25th, 2007 | 6:48 pm

    One tip that I find useful is to cancel building automatically if one project fails in a multi project solution, if left to it’s own devices VS will carry on building all the projects which can be painful if you’ve made a silly mistake in one project and end up watching VS build all the others without realising that it’s going to fail (I do find resharper helps me avoid lots of stupid mistakes and saves a lot of wasted build attempts).

    Visual Studio Hacks have a great piece of script to add to Visual Studio to do this, check out the cancelling a failed build section on http://visualstudiohacks.com/customizeBuild I do keep meaning to add a MessageBox to the code as you don’t get feedback that the build was cancelled except for your app not starting and I’ve hit F5 a number of times without realising the projects broken.

  16. Bill
    June 25th, 2007 | 10:55 pm

    Mike: one of the best things you can do is switch to a web application if that is possible; I used Scott’s suggestions and they work very well.

    David: Yeah, that is good for the memory, but it slows your system if you are just doing it for something quick, it takes IIS notably longer to start up if I hit F5 and then minimize when it says build succeeded. Win+D is better if you need to get to the desktop quickly (it doesn’t seem to cause items to go to minimized state and swap out memory). In my experience, it is better to leave the windows the way they are for as long as possible, and then if you are going to minimize or restore/maximize a couple, wait to do as many as you can at the same time (you are going to wait for one anyways) or just use win+d and leave them all non-minimized.

    I have also learned that it is generally better to keep your memory-non-intensive programs open rather than closing them and reopening them. I leave notepad opened all the time and use alt+tab to get to it instead of win+r notepad[enter], because it is faster to leave it open for copy-paste work than to go and open it again. Also, if firefox is your default browser loaded from VS, install or do something so that you can leave it open with a blank tab while working. It is faster to leave that browser open with a single tab pointing at about:blank than to load a new browser when you go to run .

    Right now, I have Firefox, opera, IE, VS2005, notepad, explorer, and outlook open on my taskbar (and I am using 1.7gb of my 2gb ram …), but it is much faster than if I had to wait for any of them to load. If I will not be using them for a while I will minimize them.

    Also, if you are using Resharper, tweaking the options on when things show up can make things much quicker. For instance if you almost always use long variable names, changing the completion list minimum length (in 3.0 C# edition: resharper -> intellisense -> completion behavior -> only those that are at least [###] characters long).

    Lastly, (from me in this comment at least :) ) close server explorer and class view if you don’t plan on using them, and hide them away. Then make sure whatever panes you have in the window, if you have one that auto hides in a particular section of your window, make all the rest of them do so; the same goes for if you have one that you always want to show, make them all shown (tab them) in the same zone. Your window should have as few splits as possible in it (weighing against your usage habits). I like to keep one pane across the bottom and one down the left side, with the right side auto-hidden (just for solution explorer to add/remove files to the solution) while working and then while debugging I move the left pane to the right side and remove the solution explorer (VS does this automatically).

  17. July 4th, 2007 | 8:45 pm

    […] July 4, 2007 at 6:41 pm · Filed under tech, VS2005 For most of the people recent migration to VS2005 devlopment environment has been full of anxiety, surprise and pain. If you feel that IDE should be more responsive and help you rather than coming in between your way then read on. Many of this tweak can still be used after applying VS2005 SP1. I am not the first one to comment on this, many have already done so. This is summary of things that worked for me after reading various postings online. I have experimented this on one solution having 160+ projects running on 4GB RAM/3.2GHz system. 1) Firstly remove all extra plug-in or integrations of VS2005. While doing so make sure that they are not the culprit. So either do this after following all other steps or disable and enable to make sure that it works for you. - I was seeing slow single file compilation speed due to DevPartners add-on. This seems to be know issue in their software and they might release a patch soon. - I removed VTune integration to speed up my project loading as VTune also parses its own project file for each project you have created. - Due to Clear Case integration with VS2005, I was seeing slow project loading times as CC queried for each project file while loading solution. It may have more impact if your software mgmt system is over slow network. 2) Close all unnecessary panels/tabs like Property View, Performance, Class view etc. Keep only what is relevant, as it seems that depending on how many panels are open, solution loading may take more time. 3) You can try removing MSDev splash screen by modifying you devenv.exe shortcut to “devenv.exe -nosplash” or type that command line. 4) Disable default setup of “startup page”. Tools -> Options -> Environment -> Startup - At startup : change this to either “show empty envy” or “show project dialog” - Uncheck “Download content every..” This cuts down on extra over the network access. 5) Turn off animation. Tools -> Options -> Environment -> General uncheck “Animate Environment tools” Note: you can increase recent file number here. It helps when you are working on more than 6 files. 6) Disable navigation bar Tools -> Options -> Text Editor -> C/C++ -> Display uncheck “Navigation Bar” This may bring lot of speed improvement at the loss of two small pull down menus at the top of file, which shows methods in the current file. 7) Turn off track changes Tools -> Options -> Text Editor ->Settings uncheck ” Track changes ” Reduces overhead and speeds up IDE response 8) Turn off Track Active item. This will turn off jumping in the explorer whenever you select different files in different projects. Tools -> Options -> Projects and Solutions -> General uncheck “Track Active Item in Solution Explorer” This will ensure that if you are moving across files in different projects, left pane will still be steady instead of jumping around. 9) Turn off Statement Completion - This may not have huge impact as it just turns off Auto intellisense update. Tools -> Options -> Text Editor -> C/C++ -> Turn off both options under Statement Completion. Now in order to bring intellisense you need to use Ctrl+J 10) Intellisense - I have not still found good solution and it many issues related to intellisense are already fixed and will be released in the Orcas. - In general intellisense does unbuffered read, so it slows down solution loading and closing time. - Let intellisense build (means leave solution open without doing any work) after major rebase to avoid it hitting when you are coding. References: 1) How to optimize launch of VS IDE at KB 2) Optimize Visual Studio for presentation from visualstudiohacks.com 3) Sara Ford’s collection of Tips and tricks and Tip of the Week. 4) Post which inspired me to write it down - thekua.com […]

  18. July 10th, 2007 | 9:52 am

    […] ), aby można było efektywnie i co najważniejsze wygodnie w nim pracować. W artykule Speeding up Visual Studio 2005, autor wymienia kilka sposobów np. poprzez wyłączenie niektórych funkcji, które pozwalają […]

  19. July 24th, 2007 | 8:26 pm

    […] Speeding Up VS.NET 2005 Hi, A very interesting and useful content I found on the internet that describes how can we improve the reponse time of Visual Studio.Net 2005 while development. It is a much needed as there has been a problem with VS.NET 2005 eating loads of resources unwantedly. See Details […]

  20. Hoary Germ
    July 31st, 2007 | 4:44 am

    A lot of Visual Studio 2005’s slowdown, as discovered with by procexp, is due to SourceSafe integration. Right-clicking anywhere in Visual Studio causes all the .vcproj/.csproj files to be read from disk. Running the debugger causes _all_ files to be read from disk. All kind of stuff like this has me looking for a better alternative. Using vi with msbuild is too slow because msbuild cannot utilize multiple cores (at least not until Orcas comes out). Does anyone remember how damn fast Visual Studio 6 was?

  21. sansay
    August 9th, 2007 | 5:12 pm

    Yes, I do remember VS6 speed. In fact I can compare it every day, and yes it’s so much faster. Too bad about VS2005 unable to use multiple core processors, as my work machine has an 8 cores CPU.

    I tried many of the suggestions listed above, but it doesn’t prevent slow response every time I type something. The cursor disappear for a couple of seconds. It’s really irritating.
    Anybody know what’s causing this?

  22. Will Buttitta
    September 5th, 2007 | 3:59 pm

    I also was frustrated by a delay while typing (especially in code comments). For me unchecking the “Navigation Bar” in “Tools::Options::Text Editor::C#::General” fixed the problem.

  23. October 30th, 2007 | 5:19 am

    […] 2 gig ram laptop running XP with a primary 7200 rpm drive. I followed some of the steps in this useful visual studio speed up guide but my main gripes are the building and startup which this won’t […]

  24. November 15th, 2007 | 2:47 am

    Hi there!

    First , I’d like to thank everyone for taking the time to post their findings. They helped alot.

    Now it’s my turn.

    So I’d like to share a solution I figured out to some ridiculously long builds I consistently experienced with VB.NET projects prepared for COM compatibility (VBA, VBS)

    Unchecking the “Register for COM interop” property for this kind of project, reduced build times from several minutes to a few seconds !!!

    I only need to recheck the property for the final build before actual deployment for testing or production.

    I’m running an isolated VS2K5 Team System SP1 on WXP Pro SP2 virtual machine (VMWARE)

    Cheers!!!

  25. Doug Porter
    November 22nd, 2007 | 3:36 am

    I was having many of the same problems listed here, for me turning off Navigation bar also helped.

    One problem I was having that I haven’t seen mentioned is that while debugging in C++ if I did Step Over or Step Into it would take 3+ seconds to move a single line. I finally fixed it by clearing all my breakpoints and now it runs like it used to.

  26. January 11th, 2008 | 12:15 pm

    Remove .REFRESH FILES to speed build time of VS 2005

Leave a reply