Performance tips for making Visual Studio 2010 faster?

PerformanceVisual Studio-2010

Performance Problem Overview


I don't know if anybody else has had an issue with the performance of Visual Studio 2010, but I close it daily and reopen it, and with an hour it starts to really bog down, and can't even keep up with my typing. Is there some obvious setting I am missing that would help to speed it up?

I am also using ReSharper, but even if I remove that, it only marginally increases the speed.

Since a couple of people have asked for my machine specs:

Intel Q9550 @ 2.83 GHz
4 Cores
8GB Physical RAM
2x 60GB SSD in RAID0 combination for solution/project
VS2010 RTM Ultimate
Windows Server 2008 x64 R2 (Performance set for Applications)

Although it is sad to hear that the answer is "buy faster hardware" when my hardware is actually pretty good.

EDIT: Including a link to the Visual Studio Performance Diagnostics tool suggested by TimothyP

Performance Solutions


Solution 1 - Performance

I recommend you consider to install some hotfixes from http://connect.microsoft.com/VisualStudio/Downloads. I had also havy performance problems before and seen messages like "insufficient memory" during Cut & Paste operations. This problem and some other (inclusive different Memory leak problems) are already hixed. After installing some hotfixes from http://connect.microsoft.com/VisualStudio/Downloads the performance of Visual Studio on my computer is much better.

Solution 2 - Performance

Adding my own answer here. I really didn't think ReSharper did that much. After trying every option and only loading one project, it was still lagging even from simply joining 2 lines together (a couple of backspace presses).

I uninstalled ReSharper and along with all of the other tweaks I have done, the thing is blazingly fast.

Solution 3 - Performance

One note re RAID0 SSDs. You should make sure your RAID controller (and driver!) supports TRIM for RAIDed SSDs. Most RAID controllers - especially the Intel chipset controllers - do NOT do this. The consequence is that I/O performance will quickly degenerate very significantly in SSD-based RAID arrays.

Windows 7 and Windows 2008R2 support the TRIM command - when your controller and driver implement it.

There is lots on this subject at sites like tomshardware.com or anandtech.com. If all else fails, you might consider either using SSDs in non-RAID, or using SSD for OS and normal, large HD for databases etc. You could also look up your specific SSDs on one of the aforementioned sites; performance varies much more widely than you might think.

Solution 4 - Performance

Try turning off IntelliTrace. I've had numerous problems related to slowness and instability because of this feature (it could just be me). The setting is under Tools > Options > IntelliTrace > Enable IntelliTrace.

Solution 5 - Performance

Of course, RAM is always very important for a large development environment like Visual Studio, especially the 2010 version and especially if you're using the Ultimate edition which includes such fairly memory intensive features as IntelliTrace and the Architecture and Modelling Diagrams.

However, one of the main things that is often overlooked, but can make a big difference to the overall performance of Visual Studio, is Hard-Drive Speed.

Scott Guthrie (Microsoft's Corporate Vice President of the .NET Developer Platform) wrote a very interesting article about this exact subject.

It's a few years old, and was written around the time of Visual Studio 2005, however, it is still very relevant today since the way that Visual Studio continues to work (specifically the way the compilers work) has not changed so much over that time.

Scott writes:

> People often ask me at conferences for > PC hardware recommendations. > Specifically - "what type of machine > do you recommend I get for doing > development with Visual Studio?" > and/or "your laptop seems really fast, > what type is it?" > > Some of my recommendations on this > topic are fairly standard and obvious: > Ideally you want to get a duel core or > better CPU. I also always recommend > getting at least 2GB or more of RAM. > > The recommendation I make that often > seems to take people a little by > surprise is to make sure you always > get the fastest possible hard-drive > when buying a new machine - and where > necessary trade off purchasing > additional CPU processor speed in > favor of investing in a faster disk > instead.

Also:

>Why does hard drive speed matter? > >Multi-core CPUs on machines have gotten fast enough over the past few years that in most >common application scenarios you don't usually end up blocking on available processor >capacity in your machine. > >What you are much more likely to block on is the Seek and I/O speed capacity with which >your computer accesses your hard drive. If you are using an application that needs to >read/write a lot of files, it is not atypical for your CPU processor utilization to be >really low - since the application might be spending most of its time just waiting for >the disk operations to complete. > >When you are doing development with Visual Studio you end up reading/writing a lot of >files, and spend a large amount of time doing disk I/O activity. Large projects and >solutions might have hundreds (or thousands) of source files (including images, css, >pages, user controls, etc). When you open a project Visual Studio needs to read and >parse all source files in it so as to provide intellisense. When you are enlisted in >source control and check out a file you are updating files and timestamps on disk. When >you do a compilation of a solution, Visual Studio will check for updated assemblies from >multiple disk path locations, write out multiple new assemblies to disk when the >compilation is done, as well as persist .pdb debugger symbol files on disk with them (all >as separate file save operations). When you attach a debugger to a process (the default >behavior when you press F5 to run an application), Visual Studio then needs to search and >load the debugger symbols of all assemblies and DLLs for the application so as to setup >breakpoints. > >If you have a slow hard-drive, Visual Studio will end up being blocked as it waits for it >to complete these read/write operations - which can really slow down your overall >development experience.

You can read the full article here:

Tip/Trick: Hard Drive Speed and Visual Studio Performance

Solution 6 - Performance

Do you have the Desktop Experience component enabled in your Server 2008 R2 install? Unlike prior versions, Visual Studio 2010 makes heavy use of WPF and its performance benefits greatly from hardware acceleration. Enabling Desktop Experience will enable the Desktop Window Manager, which improves overall WPF performance.

For the same reason, you should ensure you are using the newest video drivers available.

Solution 7 - Performance

If you are using many projects to build together in your solution I recommend to set to NOT BUILD in the project properties configuration. This is what I do to speed up mine. It is more evident in the Compile time...

Solution 8 - Performance

With that kind of hardware, IMHO you shouldn't have any kind of trouble with performance almost no matter what you do. (2 x SSD in RAID-0? -- you're a maniac!!)

It looks like you've already solved this problem (is there anything specific that you did that you could share?), but another thing to check is to make sure your video drivers are up to date. It's surprising, but they can affect a lot of things you wouldn't suspect.

I suppose another culprit could be a hyperactive anti-virus package, too...

Solution 9 - Performance

I love the suggestion of upgrades when clearly the machine is blazing. My suggestion, if possible would be to try out 2008 and see how it runs. I had several problems myself with 2010, least of all being the performance issue. For the sake of productivity I switched back to 2008.

If you can confirm that the problem does or doesn't occur on an older version we can have more of an idea where the problem lies.

Solution 10 - Performance

The brand/controller of your SSDs is more important than the fact that they are SSD. Don't buy a cheap/budget SSD - you'd be better off with a good platter drive. Splurge on the high end SSDs and you'll experience major gains.

Solution 11 - Performance

If you're editing XAML, you can just use the source code editor instead of the XAML editor. The performance difference is phenomenal:

http://msdn.microsoft.com/en-us/library/bb907321(v=vs.90).aspx

It's worth noting that if you open the xaml editor at any point, then you'll need to restart Visual Studio to get the performance back to normal. It's not sufficient to close the xaml editor.

Solution 12 - Performance

The only way to get an ssd on raid0 with trim support is with the new ocz revo 3, 1.5GB Read/1.25GB Write, A more affordable and stable solution to raided ssd with no trim is to buy an ssd on sata 3 (550MB/s).

Solution 13 - Performance

As Matt mentioned, you might want to add more RAM to your machine, but if it really "bogs down" every time you leave it open for an hour you might want to get in contact with the VS team (http://connect.microsoft.com), file a bug report and run the performance diagnostics tools they will send you.

Those guys have really helped me a lot in the past and I'm sure they'd be willing to help you track down the real reason behind the slow downs.

Aside from that I can tell you that my main development machine has 8 Xeon cores and 12GB of RAM. On that machine large solutions compile in just a few seconds while they can take up to a minute to compile on my dual core macbook. But since the RTM version I have not experienced any slow downs like the ones you are describing.

I'm assuming you are using the RTM version here, can you give us the specs of your machine? Hardware + Software?

It's very hard to help you based on limited information.

Solution 14 - Performance

I'm assuming you're using C#, but if you're using C++, maybe you could try turning off intellisense? I thought it was supposed to be better in 2010, but the previous versions always got a speed boost when I hacked out intellisense.

If it's the same as 2005, you can disable intellisense by renaming feacp.dll in [vs root dir]\vc\vcpackages.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionesacView Question on Stackoverflow
Solution 1 - PerformanceOlegView Answer on Stackoverflow
Solution 2 - PerformanceesacView Answer on Stackoverflow
Solution 3 - PerformancepelazemView Answer on Stackoverflow
Solution 4 - PerformanceJeffView Answer on Stackoverflow
Solution 5 - PerformanceCraigTPView Answer on Stackoverflow
Solution 6 - PerformanceWarren RumakView Answer on Stackoverflow
Solution 7 - PerformancerfcordeiroView Answer on Stackoverflow
Solution 8 - PerformanceKeith BluestoneView Answer on Stackoverflow
Solution 9 - PerformanceHamidView Answer on Stackoverflow
Solution 10 - PerformancesosloView Answer on Stackoverflow
Solution 11 - PerformanceGeoffView Answer on Stackoverflow
Solution 12 - PerformanceMichelView Answer on Stackoverflow
Solution 13 - PerformanceTimothyPView Answer on Stackoverflow
Solution 14 - PerformancetenpnView Answer on Stackoverflow