I've looked for some other articles on this problem and even tried some of the ideas in this thread; however, nothing has solved the issue yet. So, on to the issue.
我已经找了一些关于这个问题的其他文章,甚至在这个帖子中尝试了一些想法;然而,还没有解决这个问题。所以,关于这个问题。
Something happens when working in Visual Studio (usually C#) that causes the IDE to become a bit wonky when saving a file. I will be working along just fine for a while then at some point I notice that every time I save a file (Ctrl+S) it becomes very slow.
在Visual Studio(通常是C#)中工作时会发生一些事情,导致IDE在保存文件时变得有点不稳定。我会在一段时间内一直工作,然后在某些时候我注意到每次保存文件(Ctrl + S)时它变得非常慢。
The behavior I notice is this; I hit save in some fashion (Ctrl+S, menu, etc...) and in the status bar I see the word Searching show up. It looks like it is scanning through all of the loaded namespaces for something, although I have no idea for what or why it is doing so. It causes a real hiccup in workflow since typically I will hit Ctrl+S often and keep typing.
我注意到的行为是这样的;我以某种方式点击保存(Ctrl + S,菜单等等),在状态栏中我看到“搜索”这个词显示出来。看起来它正在扫描所有已加载的命名空间,但我不知道它是为什么或为什么这样做。它会导致工作流程出现真正的打嗝,因为通常我会经常按Ctrl + S并继续输入。
I have been unable to track down what exactly causes this to start happening. It has happened in multiple project types (web, WPF, console).
我一直无法追查究竟是什么导致这种情况开始发生。它发生在多种项目类型(Web,WPF,控制台)中。
Has anyone seen this behavior or have any suggestions?
有没有人看到这种行为或有任何建议?
4 个解决方案
#1
3
I've had a problem similar to this happen before. Are you using an plugins like ReSharper or DevExpress?
我之前遇到过类似的问题。您使用的是ReSharper或DevExpress等插件吗?
#2
6
I know the question is old but this may help others who are having the same issue.
我知道这个问题已经过时了,但这可能有助于其他有同样问题的人。
I to had a problem with VS 2008 taking long time to save some files. Not all files, just a few files. Hitting Ctrl + S would take any where from 30-120 seconds.
我有一个VS 2008的问题需要很长时间来保存一些文件。不是所有文件,只是几个文件。按Ctrl + S将占用30-120秒的任何位置。
I figured out it was on pages having external JavaScript. So I selectively commented them out and tried saving and found the offender.
我发现它是在有外部JavaScript的页面上。因此,我有选择地将它们评论出来并尝试保存并找到了罪犯。
Culprit was Google translate javascript code.
Culprit是谷歌翻译的JavaScript代码。
It starts with <script src="//translate.google.com/translate_a...
它以
Notice the //
at the beginning of the src. All other external scripts that started with http:// had no problem, I changed the // to http:// and the problem was solved.
注意//在src开头的//。以http://开头的所有其他外部脚本没有问题,我将//更改为http://,问题解决了。
It seems VS is trying to get the file locally if the path is not http. I don't know what it does, but this fixed the problem for me.
如果路径不是http,VS似乎试图在本地获取文件。我不知道它做了什么,但这解决了我的问题。
#3
1
Did you disable intellsense? We've seen that bog down all sorts of things in Visual Studio.
你禁用了intellsense吗?我们已经看到在Visual Studio中陷入各种困境。
#4
0
I had similar problem with Visual Studio 2005.
我有与Visual Studio 2005类似的问题。
I read through several posts (sorry I could not post the links because of: sorry, new users can only post a maximum of one hyperlink).
我阅读了几篇帖子(抱歉,我无法发布链接,原因是:抱歉,新用户最多只能发布一个超链接)。
I ran FileMon and discovered that on save the IDE keeps querying C:\Documents and Settings\iguigova\Local Settings\Application Data\Microsoft\WebsiteCache
我运行FileMon并发现在保存时IDE继续查询C:\ Documents and Settings \ igigova \ Local Settings \ Application Data \ Microsoft \ WebsiteCache
Then I came across this post: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=347228
然后我遇到了这篇文章:http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeededID = 347228
Now I am trying to clear the directory. It was FULL. I plan to set a batch file to delete its contents daily...
现在我正在尝试清除目录。这是完全的。我打算设置一个批处理文件,每天删除它的内容......
Good luck!
#1
3
I've had a problem similar to this happen before. Are you using an plugins like ReSharper or DevExpress?
我之前遇到过类似的问题。您使用的是ReSharper或DevExpress等插件吗?
#2
6
I know the question is old but this may help others who are having the same issue.
我知道这个问题已经过时了,但这可能有助于其他有同样问题的人。
I to had a problem with VS 2008 taking long time to save some files. Not all files, just a few files. Hitting Ctrl + S would take any where from 30-120 seconds.
我有一个VS 2008的问题需要很长时间来保存一些文件。不是所有文件,只是几个文件。按Ctrl + S将占用30-120秒的任何位置。
I figured out it was on pages having external JavaScript. So I selectively commented them out and tried saving and found the offender.
我发现它是在有外部JavaScript的页面上。因此,我有选择地将它们评论出来并尝试保存并找到了罪犯。
Culprit was Google translate javascript code.
Culprit是谷歌翻译的JavaScript代码。
It starts with <script src="//translate.google.com/translate_a...
它以
Notice the //
at the beginning of the src. All other external scripts that started with http:// had no problem, I changed the // to http:// and the problem was solved.
注意//在src开头的//。以http://开头的所有其他外部脚本没有问题,我将//更改为http://,问题解决了。
It seems VS is trying to get the file locally if the path is not http. I don't know what it does, but this fixed the problem for me.
如果路径不是http,VS似乎试图在本地获取文件。我不知道它做了什么,但这解决了我的问题。
#3
1
Did you disable intellsense? We've seen that bog down all sorts of things in Visual Studio.
你禁用了intellsense吗?我们已经看到在Visual Studio中陷入各种困境。
#4
0
I had similar problem with Visual Studio 2005.
我有与Visual Studio 2005类似的问题。
I read through several posts (sorry I could not post the links because of: sorry, new users can only post a maximum of one hyperlink).
我阅读了几篇帖子(抱歉,我无法发布链接,原因是:抱歉,新用户最多只能发布一个超链接)。
I ran FileMon and discovered that on save the IDE keeps querying C:\Documents and Settings\iguigova\Local Settings\Application Data\Microsoft\WebsiteCache
我运行FileMon并发现在保存时IDE继续查询C:\ Documents and Settings \ igigova \ Local Settings \ Application Data \ Microsoft \ WebsiteCache
Then I came across this post: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=347228
然后我遇到了这篇文章:http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeededID = 347228
Now I am trying to clear the directory. It was FULL. I plan to set a batch file to delete its contents daily...
现在我正在尝试清除目录。这是完全的。我打算设置一个批处理文件,每天删除它的内容......
Good luck!