ChatGPT解决这个技术问题 Extra ChatGPT

Why is Visual Studio 2013 very slow?

I'm running Visual Studio 2013 Pro (RTM version) on my formatted PC (Windows 8.1 fresh install).

I don't know why, but Visual Studio 2013 Pro is very very slow! Slow for building, debugging, navigating in the IDE... my hard disk drive LED is not lighting up at all!

I'm on a little MFC (C++) project using the Boost library.

Any ideas?

Thanks, i disabled the source control, but....it stay slow !
I have stopped working in VS2013 after a few days, it just kept freezing...
You should consider marking Asim Omers answer as the solution... it helped me out just fine.
Same issues, extremely slow.

U
Uwe Keim

It is something concerned with the graphics drivers. If you update them you will be fine.

Or you can disable the hardware graphics acceleration in Visual Studio according to these steps:

In Visual Studio, click "Tools", and then click "Options". In the Options dialog box, navigate to the "Environment > General" section and clear the "Automatically adjust visual experience based on client performance" check box. (Refer to the following screen shot for this step.) Clear the "Use hardware graphics acceleration if available" check box to prevent the use of hardware graphics acceleration. Select or clear the "Enable rich client visual experience" check box to make sure that rich visuals are always on or off, respectively. When this check box is selected, rich visuals are used independent of the computer environment. For example, rich visuals are used when you run Visual Studio locally on a rich client and over remote desktop.

https://i.stack.imgur.com/lZcgA.png

References:

You experience performance issues, product crashes, or rendering issues in Visual Studio 2013


This worked for me, thanks. Not sure why the OP hasn't bothered to kindly accept this as the answer.
It's not a solution for me.
Deleting the .suo file did it for me.
Seems ridiculous having "visual enhancements" enabled for developers. I'm on an i7 w/32GB and this caused problems for me over time.
Shouldn't "Use hardware graphics acceleration if available" actually increase performance? :\ not decrease it
P
Peter Mortensen

Try to set Current source control plug-in to None (menu Tools → Options → Source Control), if you are using the Microsoft Git provider, which seems to slow Visual Studio 2013 down more and more the larger the repository gets.

https://i.stack.imgur.com/jmYXD.png

I had the whole Dojo Toolkit framework under source control using the Microsoft Git provider, and it got to the point where there were delays from the time I hit a key to the time the glyph would appear on the screen. That bad.

When/if you need Git again, you can switch to the TortoiseGit provider or Git-Extensions, both will work without slowdown. I like Git-Extensions, personally.


Removing source control is not a solution in a professional development enviornment
I said switch to a different VS git extension.
The OP didn't even mention source control, let alone Git
This question transcends its original context. People search for VS 2013 slow and come here. It's helpful to know that Microsoft Git is currently slow and buggy.
@codemonkeh I had same issues as OP and turning of Microsoft Git saved me after a lot of searching.
P
Peter Mortensen

I too have struggled a bit with bad performance in Visual Studio 2013 (Premium). Pretty much the same issues as TS had. Slow navigation, scrolling, building... just about everything. Luckily I have manage to solve my own problem by disabling Synchronized Settings in Visual Studio. Go to menu Tools → Options → Environment-Synchronized Settings and remove this option by unchecking the checkbox.

https://i.stack.imgur.com/1isiF.png


This helped me for reducing the long wait time (even up to a minute) when switching configurations (e.g. from 'Debug/x64' to 'Release/Win32'). Disabling setting synchronization dropped it to normal speed of < 1 second. +1
This is the answer that seemed to fix my problem. I was waiting between 1 and 3 seconds after typing for 10 seconds in my IDE.
p
pierreluigi88

In the case of web applications, another cause of slow building and debugging (but not IDE navigation) could be the Browser Link feature.

I found that with this switched on, building would take 4 times longer and debugging was painful - after every postback, web pages would freeze for a few seconds before you could interact with them.


After upgrading to VS2013 my pages especially with javascript started to load very slow. Turning off Browser Link feature solved this problem and now my web pages load fast again. Thanks a lot!
The weird thing is that browser link slows down some pages and others not. At least one can easily check if browser link is the source of the problem. Just load a page where the problem occurs and check if after the page has been loaded the CPU usage remains high. If that is the case and the CPU usage is low if you disable Browser link, than you can be sure it's browser link. BTW: I have the feeling that it has sth to do with the use of class attributes in HTML.
This improved my debugging 400% faster. Disabling Browser link has to be done by each developer, rather you can add following appsetting to disable it from the project level
This fixed the issue for me. My machine would start thrashing after opening a web project, then navigating to it in my browser. Switching this feature off made a huge improvement. @Garzun, I think you are on the right track, I suspect media queries could be the issue.
Tried removing Git Source Control and disabling the graphics enhancements but this change made the most difference for my machine.
A
Aaron Jensen

I was using a solution upgraded from Visual Studio 2012. Visual Studio 2013 also upgraded the .suo file. Deleting the solution's .suo file (it's next to the .sln file), closing and re-opening Visual Studio fixed the problem for me. My .suo file went from 91KB to 27KB.


I'd like to concur this tip. My suo was 1mb!! I just deleted it and reopened the sln and the typing and intellisense is now immediate whereas before bringing up properties in the xaml editor would take 10s of seconds.
.suo is a hidden file.
Perhaps add information about what will be lost? E.g. settings for what to launch at F5 (the particular project. Several projects.)
P
Peter Mortensen

I had the same problem and the only solution that worked for me was to follow the three steps presented below:

Clean the WebSiteCache folder (you may find it at C:\Users\%USERNAME%\AppData\Local\Microsoft\WebSiteCache) Clean the "Temporary ASP.NET Files" folder (find it at C:\Users\%USERNAME%\AppData\Local\Temp\Temporary ASP.NET Files) Restart Visual Studio


This definitely helped and improved the situation... but did not solve it completely, this step is recommended on the journey of discovering why vs2013 is so slow and crashy
Cleaning the WebSiteCache folder did the job for me. Honestly, I can't even describe what a huge difference there is. I waited for 30 minutes to create a new ASP.NET Web Forms project and Visual Studio was often saying "Not Responding". After cleaning the cache, it takes less than 10 seconds.
The "Temporary Asp.Net Files" are usually under C:\Windows\Microsoft .Net\Framework(64)\{version}
P
Peter Mortensen

What fixed it for me was disabling Git by setting Current source control plug-in to None in Visual Studio, menu Options → Source Control:

https://i.stack.imgur.com/XOI4a.jpg


To corroborate: this fixed it for me in VS Express 2013. Having my project attached to git was absolutely killing VS.
That fixed it for me! Thanks a lot!!
Reformatted my computer, disabling Git still makes it faster so I believe this is one of the issues why VS is slow in 2013.
P
Peter Mortensen

This issue seems to be because of uninstalling the SQL Server Compact edition (4.0).

I was having this issue, and it got fixed after installing the SQL Server Compact edition 4.0. On closing Visual Studio 2013, I was getting a message to install SQL Server Compact edition as a C++ project needed some thing... can't put finger on anything.


THANK YOU! I was trying to clean off my system but for Visual Studio it backfired!
What a bizarre and completely intuitive solution. From the op's question, it is hard to trace the problem to sql compact, but hey it works.
Yes, that worked for me too. Matter of fact I dont know why it would matter but I started getting intellisense working for plain C++ code after installing SQL Server Compact Edition.
This worked perfectly. Could not understand why it was running so slowly with only c++ projects, but a warning is displayed before exiting visual studio, which I should've read better since it specifically mentions the absence of SQL Server Compact Edition...
Was it for me. Very hard to find.
H
Halim

Resolve this issue by installing Microsoft SQL Server Compact 4.0

Microsoft SQL Server Compact 4.0

https://i.stack.imgur.com/8fa2V.png


I don't follow. How is this related to this question?
This definitely works. I uninstalled mine but had to reinstall. It's as if VS goes off on a wild goose chase to look for this component constantly, so do yourself a favor and make sure it's installed.
user3534241's answer also alluded to this.
P
Peter Mortensen

I can advise an option like this.

CodeLens can be disabled like as at the picture. It gives a lot of performance goodness.

https://i.stack.imgur.com/fWpER.png


P
Peter Mortensen

If you are debugging an ASP.NET website using Internet Explorer 10 (and later), make sure to turn off your Internet Explorer 'LastPass' password manager plugin. LastPass will bring your debugging sessions to a crawl and significantly reduce your capacity for patience!

I submitted a support ticket to Lastpass about this and they acknowledged the issue without any intention to fix it, merely saying: "LastPass is not compatible with Visual Studio 2013".


Amazing, I just installed LastPass this AM and never thought twice that it was causing my headaches...
It's not just IE. Same issue with Chrome and Firefox it seems. Disabling it returned VS to normal once again for me.
P
Peter Mortensen

I had the same problem and all the solutions mentioned here didn't work out for me.

After uninstalling the "Productivity Power Tools 2013" extension, the performance was back to normal.


I also have had this issue with the same fix using Visual Studio 2015.
P
Peter Mortensen

One more thing to check; for me it was Fusion logging.

I'd turned this on a very long time ago and more or less forgotten about it. Getting rid of the 5000+ directories and 1 GB of logged files worked wonders.


I've enabled fusion logging in the past, and forgotten about it. In solutions with lots of projects (20+) this can really kill performance. I've disabled it again and everything is very speedy now. Also only enabling bind failures is better for performance then all bindings.
What is "Fusion" (in this context)?
P
Peter Mortensen

There is a good workaround for this solution if you are experiencing slowness in rendering the .cs files and .cshtml files.

Just close all the files opened so that the cache gets cleared and open the required files again.


P
Peter Mortensen

Visual Studio Community Edition was slow switching between files or opening new files. Everything else (for example, menu items) was otherwise normal.

I tried all the suggestions in the previous answers first and none worked. I then noticed it was occurring only on an ASP.NET MVC 4 Web Application, so I added a new ASP.NET MVC 4 Web Application, and this was fast.

After much trial and error, I discovered the difference was packages.config - If I put the Microsoft references at the top of the file this made everything snappy again.

https://i.stack.imgur.com/KLkMT.png

Move the Microsoft* entries to the top.

https://i.stack.imgur.com/RszdN.png

It appears you don’t need to move them all - moving say <package id="Microsoft.Web.Infrastructure" has an noticeable effect on my machine.

As an aside

Removing all contents of the file makes it another notch faster too*

Excluding packages.config from Visual Studio does not fix the issue

A friend using Visual Studio 2013 Premium noticed no difference in either of these cases (both were fast)

UPDATE

It appears missing or incomplete NuGet packages locally are the cause. I opened the Package manager and got a warning 'Some NuGet packages are missing from this solution' and choose to Restore them and this sped things up. However I don’t like this as in my repository I only add the actual items required for compilation as I don’t want to bloat my repository, so in the end I just removed the packages.config.

This solution may not suit your needs as I prefer to use NuGet to fetch the packages, not handle updates to packages, so this will break this if you use it for that purpose.


This answer had the most significant effect in my case. Thank you.
Yes it seems missing Nuget packages too cause VS 2013 to slow down. Strange!
P
Peter Mortensen

For me, the problem was the Start page -- it was downloading content and causing Visual Studio to hang.

The only solution for me was to:

Kill the DevEnv process from Task Manager Start Visual Studio in Safe Mode from the command line: devenv.exe /safemode Go to menu Tools → Options, and select the Environment/Startup options Choose "Show empty environment" for the startup action Close Visual Studio Restart normally


P
Peter Mortensen

Running unit tests was slow. It was a ReSharper issue.

Menu ReSharper → Options → Environment → General ... Clear Caches Menu Tools → Options → ReSharper → General ... Suspend Now Close Visual Studio Delete the .suo file. Open Visual Studio again. Re-enable ReSharper.


P
Peter Mortensen

I also had an issue with a slow IDE.

In my case I installed

ReSharper

Npgsql (low chance to cause the problem)

Entity Framework Power Tools Beta 4

The following helped me a bit:

Disabled synchronization - menu Tools → Options → Environment-Synchronized Settings

Disabled plug-in selection - menu Tools → Studio → Options → Source Control.

Disabled Entity Framework Power Tools Beta 4 - menu Tools → Extensions and Updates

Uninstalled JetBrain's Resharper - WOW!! I am fast again!!


P
Peter Mortensen

Change the Fusion Log Value to 0. It solved my issue.

This is the FusionLog key in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
Check ForceLog value (1 enabled, 0 disabled).

"Fusion Log Value" vs. "FusionLog" vs. "Fusion": What is literal and what is not?
P
Peter Mortensen

I was also facing this issue for quite long time. Below are the steps that I perform, and it works for me always:

Deleting the solution's .suo file.

Deleting the Temporary ASP.NET Files (You can find it at find it at %WINDOW%\Microsoft.NET\Framework\Temporary ASP.NET Files)

Deleting all breakpoints in the application.


P
Peter Mortensen

Visual Studio 2013 has a package server running, and it was spending up to 2 million K of memory.

I put it to low priority and affinity with only one CPU, and Visual Studio ran much more smoothly.


What is the process name of Visual Studio package server ? You see, 2 million K of memory is a lot, ~1.9GB of RAM. Is it devenv.exe process or something else ?
P
Peter Mortensen

Performance Explorer

Have you been using menu Analyze → Performance and Diagnostics? I have! It's awesome! But you may want to clean up.

Open the Performance Explorer. If you collapse all of the items in there, select all, then you can right click and do Delete.

My solution opens faster and is in general running much faster now.

Also you may notice changes to your sln file as shown. For me, this section was deleted from the sln.

GlobalSection(Performance) = preSolution
    HasPerformanceSessions = true
EndGlobalSection

This is for measuring apps performance during development, but not for visual studio itself
Yes, but using the tool will affect visual studio performance as in my case. This question and set of answers is more like a check list. Not all answers will apply in all cases.
Can you add some more information to the answer about what it deletes/changes (some state is altered)?
P
Peter Mortensen

In Visual Studio 2015 Community edition, I've experienced a very (very) slow IDE after changing the "Environment Font" on menu Tools → Options... → Fonts and Colors.

Reverting this options back to the default value ("automatic") solved it immediately.


This is definitely the weirdest optimization I've seen on this thread so far. I wonder how Font was messing it up...
P
Peter Mortensen

I had similar problems when moving from Visual Studio 2012 → Visual Studio 2013. The IDE would lock up after almost every click or save, and building would take several times longer. None of the solutions listed here helped.

What finally did help was moving my projects to a local drive. Visual Studio 2012 had no problems storing my projects on a network share, but Visual Studio 2013 for some reason couldn't handle it.


P
Peter Mortensen

I had a Visual Studio 2013 installed, and it was running smoothly. At some point it started to get sluggish and decided to install Visual Studio 2015. After install, nothing changed and both versions were building the solution very slow (around 10 minutes for 18 projects in solution).

Then I have started thinking of recently installed extensions - the most recent installed was PHP tools for Visual Studio (had it on Visual Studio 2013 only). I am not sure how can an extension affect other versions of Visual Studio, but uninstalling it helped me to solve the problem.

I hope this will help others to realize that it is not always Visual Studio's fault.


P
Peter Mortensen

I added "devenv.exe" as an exclusion to Windows Defender. This solved my problem completely. People can try this as their first try.


P
Peter Mortensen

I have the same problem, but it just gets slow when trying to stop debugging in Visual Studio 2013, and I try this:

Close Visual Studio, then

Find the work project folder

Delete .suo file

Delete /obj folder

Open Visual Studio

Rebuild


P
Peter Mortensen

None of the suggestions worked for me, but I did solve my problem. I had tried most of the other recommendations before coming to the following solution.

My Scenario/Problem:

Using Visual Studio 2017 with ReSharper Ultimate. Keyboard input in the IDE got super slow as others have described. The last change I made to my solution was to add a new web site project, so I looked into that. After trying a lot of things, I tried adding a second web site project, so I could try to replace the first one, and Visual Studio just tanked after that. It wouldn't even load the solution anymore.

My Solution:

I forced Visual Studio closed and then I removed the newly added web site project(s) from the .sln file using Notepad. After saving and starting Visual Studio, my solution loaded quickly and everything seemed to be back to normal. I added a new Web Site with a slightly different configuration (see the thinking below), and the problem did not present itself again.

My Thinking:

I think the problem stemmed from creating the new web site project and using a file system path to a network share that is hosted in Azure. I'm working over VPN which tends to slow things down, and I occasionally experience various routing problems with some services, so my problem/solution might be a bit of a snowflake. I changed the file system path to be a local repository and will publish the files as needed which seems like a much better way to go.


P
Peter Mortensen

I had a Visual Studio behavior where the typing was slow for my HTML files. Previously when I installed, I guessed that because my HTML files were generic HTML that the need to install any web development tools from the workload component of the installer was unnecessary. I went back and installed this bit and Visual Studio behavior became as I expected it.


i
i Mr Oli i

This already has a bunch of answers here, but a general way to easily boost Visual Studio is to clear your temp files.

Press the Windows Key and R, and enter 'temp'. Press enter, and provide any administrator permission if you need to. Then press Control A to select all, and hit the Del key. Remember to provide any administrator permissions, and if 'the item is already in use' then just press skip.

After this, Press Windows Key and R again, but this time type '%temp%'. Repeat the previous steps in the new directory.

Finally, empty the recycle bin.

This might not help a ton, but it should boost general performance.