Boosting Visual Studio Performance

6 Mar

Visual Studio has always worked fairly well for me at home, but at work where many of our projects/solutions are very large Visual Studio struggles. At home I still find that my Visual Studio is better than the one I use at work and I believe this is because at home I have my hard-drives in a performance RAID (Raid 0) and my OS is Vista x64 rather than XP x86.

Two things I suspect are:

Vista manages memory much better and doesn’t struggle with the out of memory exceptions that I frequently get at work. Note: Out of memory exceptions are actually to do with the .NET runtime not being able to garbage collect all of its generations properly. But the size of Visual Studio and the number of objects it is using is the cause of this.

Hard-drive speed affects Visual Studio more greatly than CPU and potentially even RAM. When I get out of memory exceptions at work (we all get this too btw) my PC is not using all of its 2 gigs of ram. Visual Studio is limited by default to 2 gigs, but this can be overcome.



Faster harddrives, lowerlatency hard drives:

On Vista with my RAID 0 my experience is better but is still latent. My IDE can load lots of data fast but often takes a while to do so. This means waits are still a small amount of time due to latency issues but large amounts of data are not really an issue.

I am starting to think that the ideal solution is a performance raid of Solid State Drives (SSD).  A link on performance improvements for a Java IDE are available here:

If you have an infinite money pool, a RAID card would be recommended too. These can have RAM on them to cache disk access which would further reduce latency.

Upgrade OS:

Upgrade to Vista and make sure you upgrade to the 64 bit version. It is silly not to take advantage of your CPU being x64.




Myth: Reshaper significantly degrades performance, and causes out of memory exceptions.

Interestingly resharper shows the out of memory exceptions (which can be a pain) where as Visual Studio virtually hides it from the user. Resharper is not causing these issues, and from what I have seen there is no significant performance difference apart from when the project is being loaded. That is because resharper loads its cache then by analysing assemblies.


Myth: Increasing RAM will increase Visual Studio’s performance

I think that if Visual Studio is running out of memory then a RAM increase will help, but for us at work our RAM is not being fully utilized so on XP increasing our RAM won’t help us as the OS will not use it. On Vista however the OS endeavours to use as much free RAM as it can to cache and pre-allocate so it is possible this will help a little bit. I think the biggest myth about personal computing is that upgarding CPU and RAM makes the biggest difference. My computer at home is 4 years old and my computer at work is 6 months old. My computer at home that is 4 years old is faster in practical usage. If it came down to a number crunching war then the new computer would win but there is virtually no use case for that in personal computing.


5 Responses to “Boosting Visual Studio Performance”

  1. Daniel April 15, 2009 at 10:06 am #

    I’m going to mythbust your RAM Myth:

    The performance benefit you see in Vista x64 is directly due to ram availability. You get the same exact benefit from running Windows XP 64bit (and I know several developers that do exactly this).

    Under 32bit windows the maximum available ram for all applications COMBINED is half of the 32bit address space = 2GB.

    Under 64bit windows the maximum available ram for each application is an entire 32bit address space = 4GB.

    Note the difference: each and every 32bit application gets their own 32bit memory space under 64bit windows, so each application can use 4GB of ram. Visual Studio as we know, loves available ram – 64bit windows gives it the most it can use.

  2. rhwilburn April 16, 2009 at 5:23 am #

    My computer at work and my computer at home both have 2 gigs ram. So 2 gigs combined or 4 gigs each app wouldn’t make a difference for me?

  3. Daniel April 16, 2009 at 5:36 am #

    It would make a difference as 32bit windows will only allocate application memory out of a shared 2GB memory pool – and it won’t allocate all of it in case you want to use something else and to keep the system responsive.

    64bit windows has a memory manager tuned quite differently and will allocate more of the memory to your one 32bit app.

    But above all else, why on earth are you even attempting to use Visual Studio on a machine with less than 4GB of ram! The devs I know with 64bit windows run with 6GB ram to ensure that Visual Studio can allocate and use a full 4GB for itself.

  4. Arno June 7, 2010 at 7:02 am #

    Daniel, I must mythbust your RAM myth as well:

    You wrote:

    “Under 32bit windows the maximum available ram for all applications COMBINED is half of the 32bit address space = 2GB.”

    The 2GB limit for 32bit usermode virtual address space is applied on a per-process basis, not for all processes combined. And even that can be lifted up either using the /3GB switch, AWE (and applications that support AWE), or allocating memory OUTSIDE virtual address space using CreateFileMapping().

  5. Rob April 7, 2011 at 9:19 pm #

    Daniel, I must muthbust your Resharper myth. Resharper is a memory hog (but not as much as VS2010!). I am unable to build my larger solutions with it installed and get out of memory exceptions. I’ve proven this over and over again, many times in my team.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: