本文介绍了Visual Studio 2012 Ultimate 在编辑 C# 代码时速度很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了许多关于禁用图形加速、关闭 IntelliTrace 和使用 Sysinternals Process Monitor (ProcMon) 的文章,但我不知道如何找出导致我的编辑器速度慢得离谱的原因.ProcMon 显示 devenv.exe:

I've checked a number of articles about disabling graphics acceleration, turning off IntelliTrace, and using Sysinternals Process Monitor (ProcMon) and am at a loss as to how to find out what is causing my editor to be ridiculously slow. ProcMon shows devenv.exe:

针对C:\"、C:\Users\my_user_name"(以及一些来自我项目的随机文件)执行大量NotifyChangeDirectory",以及

performing a large number of "NotifyChangeDirectory" against "C:\", "C:\Users\my_user_name" (and also some with random files from my project), and

注册表操作(RegQueryKey、RegSetInfoKey、RegQueryValue、RegCloseKey)针对:

registry operations (RegQueryKey, RegSetInfoKey, RegQueryValue, RegCloseKey) against:

  • HKLM\SOFTWARE\Wow6432Node\Microsoft\Cryptography\Defaults*,
  • HKCU\Software\Microsoft\VisualStudio\11.0\General\AutoRecover*,
  • HKCU\Software\Microsoft\VisualStudio\11.0\FileMRUList,
  • HKCR\Drive\shellex\FolderExtensions, HKCU\Software\Classes

并且它还对项目中的文件执行文件打开和关闭操作(看似随机).

And it also performs file open and close operations (seemingly random) against files in the project.

即使打开单个项目和一个 Visual Studio 2012 Professional 实例也会发生这种情况.有人有什么想法吗?

This happens even with a single project and one instance of Visual Studio 2012 Professional open. Anyone have any ideas?

这是在具有 16GB RAM 和 SSD 的 Intel i7 机器上.任务管理器不指示 CPU 利用率、内存或磁盘问题.IntelliTrace 已禁用.图形加速被禁用.Visual Studio 2012 旗舰版.

This is on an Intel i7 machine with 16GB of RAM and an SSD. Task Manager doesn't indicate a CPU utilization, memory, or disk issue. IntelliTrace is disabled. Graphics acceleration is disabled. Visual Studio 2012 Ultimate.

去了一台新机器,它也发生在那里.现在,在 Visual Studio 2013 中.

Went to a new machine and it happens there, too. Now, in Visual Studio 2013.

推荐答案

可能还有很多其他问题,但在我的情况下,是启用了程序集绑定日志(Fusion logs)降低了 VS 速度.

It may be many other things, but in my case it was the Assembly Binding Log (Fusion logs) enabled that slow down VS.

参见与 Fusion 日志相关的答案.修改注册表后需要重启VS.

See this answer relative to Fusion logs. VS need a restart after changes in Registry.

如果它不能解决您的问题,我强烈建议您使用 进程监视器以找到罪魁祸首活动.我也有很多与 AutoRecover 相关的日志,但这并不是我项目中的真正问题.

If it doesn't resolve your issue, I strongly suggest you to use Process Monitor to find the culprit activity. I had also a lot of AutoRecover related logs but it was not the real issue in my projects.

这篇关于Visual Studio 2012 Ultimate 在编辑 C# 代码时速度很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 18:44