Visual Studio 2010 — how to reduce its memory footprint

故事扮演 提交于 2020-01-10 22:04:59

问题


I have a solution with just under 100 projects in it, a mix of C++ and C# (mostly C#). When working in VS2005, the working set of Visual Studio is considerably smaller than that of VS2010.

I was wondering if there are some things that can be turned off, so I can develop in VS2010 under 32-bit OS without running out of memory.


回答1:


You can try using the Solution Load Manager. It'll let you mark some of the projects files as load on demand or not load at all. That may help.




回答2:


A 64-bit OS should help you out a bit here, if you get more than 4GB of physical RAM. A 64-bit OS can provide 32-bit processes with a full 4 GB of virtual memory, whereas a 32-bit OS only can provide 2 or 3 gigs at best, depending on how you boot the OS.

That being said, 100 projects is a pretty fat solution file. Maybe now would be a good time to reexamine that decision...

EDIT: Running dumpbin /headers as prescribed in the article for DEVENV.EXE returns:

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             14C machine (x86)
               4 number of sections
        4BA1FAB3 time date stamp Thu Mar 18 06:04:35 2010
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
             122 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
                   32 bit word machine

So that would indicate that an x64 box with > 4GB of RAM will probably improve your experience. You should have up to twice as much VM available for Visual Studio under a 64-bit OS...




回答3:


The best thing you can do is to split up your solution. Visual Studio wasn't meant to handle so many projects in the same solution and does suffer performance problems as a result. Splitting up your solution into 5 different ones will make things better.




回答4:


If you're on XP, upgrading to Vista or Windows 7 will help as it uses WPF. May reduce the memory footprint of the UI rendering which would otherwise have to use compatibility mode.



来源:https://stackoverflow.com/questions/3054504/visual-studio-2010-how-to-reduce-its-memory-footprint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!