I have noticed a memory (private working set) increase in devenv.exe process – Visual studio 2010 – professional edition, even when it is in ideal state. Sometimes, it goes over 1GB, and frequently crashes with the message (OutOfMemoryException) “Not enough storage available”. I am fed up of frequent VS crashes during the builds, for which I have to frequently restart the VS studio.
I have
- Have a 4GB Memory Ram
- Around 30 projects in my solution
- applied hotfixes at microsoft connect site and
- used the hack for VS to use more than 2GB of memory as mentioned in
(http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx)
with editbin option to increase the stacksize used by devenv.exe process (http://stackoverflow.com/questions/4189109/error-code-1073741515-when-using-editbin)
I am wondering if any one of you have had any way around for this issue. Any discussion or pointers will be appreciated
Thanks
It happens. Especially when you build large projects in VS, open Designers. I happened to get such error several times a day – also have large solution. What really helped me to get rid of such problem is the tool that builds solution in shadow mode(start msbuild in other processes). There are several tools – I recommend NCrunch since I use it. It is primarily TDD tool but it was surprisingly handy in building large solution. I still get OutOfMemoryException if I need to build solution in VS2010 – in order to run WinForms designer for example but it is a quite rare case.
Try to get rid of accessors if you use tests.
Also I have some snippets in order to improve performance of VS2010. Maybe it also reduces memory consumption (didn’t measure it – you may try)
30% speedup
Tools > Options — CHECK “Show all options”
IntelliTrace — DISABLE
HTML Designer — DISABLE
50% startup speedup
Tools > Options
Environment > Add-in/Macros Security — UNCHECK “Allow Add-in components to load”
Tools > Extension Manager
Uninstall all you don’t need.
Tools > Options > Environment >
Uncheck “Automatically adjust visual experience based on client performance”
then uncheck “Enable rich client visual experience”.
Tools > Options > Environment > Startup:
At startup = “Show empty environment”
Tools > Options > Source Control
Set to “None”