visual-studio Visual Studio 2005 内存使用情况

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/168375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:42:38  来源:igfitidea点击:

Visual Studio 2005 Memory Usage

visual-studiomemoryvisual-studio-2005memory-management

提问by Ris Adams

I find that quite often Visual Studio memory usage will average ~150-300 MB of RAM.

我发现 Visual Studio 内存使用量通常平均约为 150-300 MB 的 RAM。

As a developer who very often needs to run with multiple instances of Visual Studio open, are there any performance tricks to optimize the amount of memory that VS uses?

作为经常需要在多个 Visual Studio 实例打开的情况下运行的开发人员,是否有任何性能技巧可以优化 VS 使用的内存量?

I am running VS 2005 with one add-in (TFS)

我正在使用一个加载项 (TFS) 运行 VS 2005

采纳答案by Scott Dorman

From this blog post:

来自这篇博文

[...]
These changes are all available from the Options dialog (Tools –> Options):

Environment

  • General:
    • Disable “Animate environment tools”
  • Documents:
    • Disable “Detect when file is changed outside the environment”
  • Keyboard:
    • Remove the F1 key from the Help.F1Help command
  • Help\Online:
    • Set “When loading Help content” to “Try local first, then online” or “Try local only, not online”
  • Startup:
    • Change the “At startup” option to “Show empty environment”

Projects and Solutions

  • General:
    • Disable “Track Active Item in Solution Explorer”

Text Editor

  • General(for each language you want):
    • Disable “Navigation bar” (this is the toolbar that shows the objects and procedures drop down lists allowing you to choose a particular object in your code.
    • Disable “Track changes”

Windows Forms Designer

  • General:
    • Set “AutotoolboxPopulate” to false.
    • Set “EnableRefactoringOnRename” to false.

[...]
这些更改都可以从“选项”对话框(工具 –> 选项)中获得:

环境

  • 一般
    • 禁用“动画环境工具”
  • 文件
    • 禁用“在环境外更改文件时检测”
  • 键盘
    • 从 Help.F1Help 命令中删除 F1 键
  • 帮助\在线
    • 将“加载帮助内容时”设置为“先尝试本地,然后在线”或“仅尝试本地,不在线”
  • 启动
    • 将“启动时”选项更改为“显示空环境”

项目和解决方案

  • 一般
    • 禁用“在解决方案资源管理器中跟踪活动项目”

文本编辑器

  • 一般(对于您想要的每种语言):
    • 禁用“导航栏”(这是显示对象和过程下拉列表的工具栏,允许您在代码中选择特定对象。
    • 禁用“跟踪更改”

Windows 窗体设计器

  • 一般
    • 将“AutotoolboxPopulate”设置为false。
    • 将“EnableRefactoringOnRename”设置为false。

回答by Andy Stevenson

Upgrade to a 64-bit OS. My instances of VS were taking ~700MB each (very large solutions).. and you rapidly run out of room with that.

升级到 64 位操作系统。我的 VS 实例每个占用了大约 700MB(非常大的解决方案)……而你很快就用完了它的空间。

Everyone on my team that has switched to 64-bit (and 8GB RAM) has wondered why they didn't do it sooner.

我团队中已经切换到 64 位(和 8GB RAM)的每个人都想知道他们为什么不早点这样做。

回答by Andy Stevenson

minimize and re-maximize the main vs window to get vs to release the memory.

最小化并重新最大化主vs窗口以获得vs释放内存。

回答by Mattias Marder

By uninstalling (and re-installing) Visual Assist the problem got solved for me.

通过卸载(并重新安装)Visual Assist,我的问题得到了解决。

回答by Simon_Weaver

The number 1 thing you can do is switch to Windows 8.

您可以做的第一件事是切换到 Windows 8。

It uses memory sharing / combining if the same DLL or memory page is loaded into multiple processes. Obviously there's a lot of overlap when running two instances of VS.

如果同一个 DLL 或内存页面被加载到多个进程中,它使用内存共享/组合。显然在运行两个 VS 实例时有很多重叠。

enter image description here

在此处输入图片说明

As you can see I've got 4 Visual studios running and the shared memory column (you need to enable this column for it to be visible) shows how much memory is being shared.

如您所见,我有 4 个 Visual Studio 正在运行,共享内存列(您需要启用此列才能看到它)显示共享了多少内存。

So in Windows 7 this would use 2454MB but I'm saving 600+MB that are shared with the other devenv processes.

因此,在 Windows 7 中,这将使用 2454MB,但我节省了与其他 devenv 进程共享的 600+MB。

Chrome too has a lot of savings (because each browser tab is a new process). So overall I've still got 2GB free where I'd normally be maxed out.

Chrome 也有很多节省(因为每个浏览器标签都是一个新进程)。所以总的来说,我仍然有 2GB 的可用空间,而我通常会用完。