Im struggling with extremely slow Visual Studio. I use it to build C++ projects mostly.
Everything could be super slow. Menu's loading, intelIsense tips, builds. I've just tested building simple solution in 1 file, and build took around 5 minutes. But! I found this article about Windows Performance Analyzer which I used to trace this solution build. Despite overall time taking around 5 minutes, WPA report build took only around 0.686 seconds, attaching screenshot:
apparently I press "rebuild" in VS and build itself started ~300 seconds later(timeline).
Currently I use VS2019. Same problem I observed on VS2017. I did removed all VS components and installed VS2019 and problem is not gone. All other programs run fine. No excessive CPU load(intell 6700k), no noticeable harddrive usage(windows and VS components are on m2 ssd, lightning fast), 32 gb ram and enough free space on system disk.
Only VS extension I installed myself is QT extension for VS2019. Which actions can I take next to find the problem?
Things to try:
devenv /safemode from a command line starts the IDE in safe-mode with all plugins disabled.
Visual Studio Installer and repair install
Disable graphics acceleration in Visual Studio (Tools|Options|General ... there are a few "rich client visual experience" related things)
Check paths on your computer. If other apps run fine but one does not, it could be that this app tries to access a network drive or website which is not available.
Run "procmon" and "procexp" (Process Monitor/Process Explorer from Sysinternals) and take a look at what's going on.
Try VS 2022.
Related
I recently changed my work computer and I'm struggling developing with Visual Studio 2019.
This is a simple operation that highlights the problem. This happens when application is in debug mode with debugger attached.
As soon as I detach the debugger (Debug > Detach all in VS) the speed returns to normal. Speed is OK also with the installed version of the software. I tried using the Performance Profiler to see where the time is going but since the debugger is not attached in that configuration speed is fine there too.
I must add that only some operations, like the one pictured, are incredibly slow. In many cases the application runs as smooth as the installed version.
I've compared every option under Tools > Options > Debugging with my previous computer and one colleague and they match perfectly. The operating system is the same, Windows 10, and the installed version of VS is the same.
I tried cleaning the build, removing the .vs folder, repairing Visual Studio with no luck. I've always used a desktop PC (my last one was an I7 8xxx), the new one is a laptop with Ryzen 7. Other colleagues have a laptop with Intel processors and they show no issue.
Any help would be greatly appreciated.
As pointed out by Hans Passant in a comment, this was due to an excessive amount of lines written in the debug window. Lines of log written to an external file (via an Enterprise Library logger) were echoed in the debug window, so I think the whole process was waiting for that window to be constantly updated.
VS2019 was working fine.
Then I ran Visual Installer and added "Mobile development with .NET".
After than, visual Installer "update" button was showing, so I did the update.
But now when I stop my VS2019 project at a breakpoint, single stepping is very slow, taking many seconds per step.
Tried restarting VS2019, and restarting my Windows 10 Pro, but got same slowness.
Opened same project with VS2017, it is debugging is OK, no slowness.
The resolution I found was that the culprit is not Internet, RAM, or CPU.
It is the Disk Usage. Check for your disk usage under the Performance tab in Task Manager. Try and find out which process (Anti-Malware/ anti-virus/ant other process) is eating up your resources.
Kill the culprit and it works smooth. For me, it was Disk Scan Service and Windows Search Service (which is fairly useless).
Check this link to kill the Windows search service.
Comprehensive deletion of all contents of %TEMP% worked for me -
https://developercommunity.visualstudio.com/content/problem/516141/very-hight-cpu-usage-by-visual-studio-2019.html
I can't believe is 2020 and MS can't stop spaffing crap into a temp directory which causes their software to slow to a snails pace with some kind of infinite processing issue. Jeez.
For me it was NVidia NSight for visual studio. Uninstalling it from the windows application list was the only option as it wasn't showing up in the VS2019 Extensions manager.
For me it turned out to be a problem with the installation. I had old versions of Visual Studio and .NET libraries still on my machine. I did a full uninstall of Visual Studio, .NET Core SDK, .NET Framework, etc. and then re-installed Visual Studio 2019 and just the .NET libraries that I needed. After that VS 2019 debugging is speedy.
I was experiencing the same issue stepping over one line of code took me 1400 ms on my VM and 6 ms on my coworker's VM. (Earlier this week he had copied my VM so essentially we were on the same machine).
Took me some time but then I remembered a change I did to my visual studio.
Earlier that week I needed to step into one of our DLLs. To do this I changed my debug settings under Project Properties --> Debug --> Debugger engines. I Checked "Enable native code debugging". This was wonderful to allow me to debug into our DLL and see what was happening on the other side, although it dramatically slowed down my debugging (233x slower to be exact!!!!).
The performance change will different per your solution and how much you are inheriting, but unchecking this did the fix for me!
Delete .vs folder where locate in your project root directory after backup.
It seems that incredibuild was installed on my PC, likely came in bundle with visual studio. It autostarts when my PC runs, and it has high disk usage and eventually will slow down the entire PC. I will have to stop it from running to make my PC fast again.
I tried removing it but each time I did, it would come back a few days later even if I havent used visual studio for the past 2 weeks. Disabling it from startup will not work either, it will be running when the PC starts anyway. So what am I supposed to do with Incredibuild? I dont want to uninstall Visual Studio, but I need Incredibuild gone.
IncrediBuild is a build acceleration software that accelerates Visual Studio compilations by distributing the compilation tasks to idle machines across your network. As IncrediBuild is bundled with Visual Studio, you probably chose to install it as part of your Visual Studio setup.
IncrediBuild is not supposed to use any of your resources when it is not in use and we haven't received such a feedback from the >100,000 developer using IncrediBuild...
To uninstall the IncrediBuild plug-in, go to Visual Studio Tools->Extensions and Updates. In the popup window, under the Install tab, choose IncrediBuild Build Acceleration and uninstall.
We'd highly appreciate if you can make sure that the problem you reported indeed comes from IncrediBuild and if so, contact us at support#incredibuild.com
Disclaimer, the write is working at IncrediBuild.
I'm currently evaluating Visual Studio 2015 RC. I've noticed when running the IDE, The Visual Studio 2015 process is constantly at around 25% CPU usage. Even without a project loaded and without the welcome page it is gobbling up 25% CPU usage at a constant rate. No other applications running other than background services. All other running processes use around an additional 2 to 4 percent CPU overall.
This behavior has also been noticed in Visual Studio 2013.
Is anyone else seeing this behavior? Is this normal? Any suggestions?
Had this same problem. Processor constantly at 45-50% even when the IDE is completely idle.
Turns out the problem is the Microsoft Git Source Code provider.
I turned that off and processor dropped to 0 and the IDE became much more usable.
In my case disabling Telerik ASP.NET MVC Extension solved high CPU issue.
High CPU load started on solution load and didn't drop (40% with one, 80% with two solutions) until VS was closed or even sometimes after (had to kill the process).
Tools->Extensions and Updates->Installed, find the extension and click 'Disable'.
In my case all reference counts tried to update every time when I edit code.
I have just turned them off. You can do it this way.
It’s not to be expected that Visual Studio should chew up continuous CPU time.
I am running Visual Studio 2015 Community RTM right now with a medium sized project open, and am not seeing any ongoing CPU usage (according to Process Hacker 2, which shows usage as small as 0.01 percent). It’s just blank, which means not even 0.01% CPU usage is registering.
Keep in mind that IntelliSense scans your project files in the background to build the database for popping up its suggestions, etc.
Choosing Project > Rescan Solution from the menus will result in that process being done over, which will cause the CPU to be used for a time. But it should ultimately go quiet.
Seemingly forever, there have been times when deleting the Intellisense Database files and doing a full rescan solves “odd behavior” type problems. I don’t know if it’s the “prescribed” method, but if I suspect an IntelliSense problem I just delete the .sdf file in the project folder if I want to make sure Visual Studio starts with a clean slate. This isn’t necessary very often.
I also had this problem, constant 20-40% CPU when idling (Visual Studio 2015 update 1). I noticed that other local repositories of the same code did not have this problem.
I deleted the problematic local repository and took a new checkout, this solved the issue for me. Why this worked, I unfortunately cannot explain...
I run resharper, turned that off and turned off the Microsoft Git provider and still had high CPU issues, devenv.exe would also run after close... until recently.
It appears VS 2015 Update 2 has resolved these issues!
https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx
In my case; "Visual Studio 2015 Update 1" gone crazy editing JS files regarless of the length of the source. It used high CPU and the editor is even freezed. I fixed the issue by disabling the 3rd party add-ons by one-by-to detect the buggy one causing VS 2015 malfunctioning.
Hope it works.
In my case, the culprit was Node.js tools for Visual Studio. I had v1.1.2 installed and the cpu was constantly around 25-40%.
A switch to Node.js Tools v1.2 RC resolved the problem completely after an initial high load that went away in a couple of minutes.
In my case it was either the Roaming Extention Manager or most probably the azure worker role project in my solution. If you have one of these try unloading it and restart visual studio. I can reproduce it but I don't know why it happens.
I've noticed also that when running and stopping a debug episode on the local server, if the page is still open in the browser, VS will continue to run at high CPU. Closing the browser page stops this.
I want to share my experience,
In my case I had to diable all extensions and updates and code analysis c#.
1-For extensions and updates :
Tools => Extensions and updates
2-For the code analysis
Solution explorer => right click on the project => Properties =>Click on the tab "Code analysis" => click on the "Open" bouton => Uncheck the checkbox "Microsoft.CodeAnalysis.CSharp" => save and exit.
Cpu usage descended to 1 %.
In my case, The .suo file in Visual Studio was the culprit. Deleting it fixed my issue.
Refer below link for more details.
https://shemeerns.com/2014/04/04/the-solution-user-options-suo-file-in-visual-studio/
I have problem with Visual Studio 2010 on Windows 7 64-bit. After some time of work VS starts consuming ~50% CPU and UI responding slows down. When I close VS then UI disappear but process stay.
When I forgot to kill those hung processes at the end of day, I will end up with numerous devenv.exe processes.
I have reinstall Visual Studio and reinstall Windows and ended up with the same problem... doesn't change anything. Please help. :/
Remove and/or uninstall all third-party Visual Studio add-ins and extensions. Disabling is not good enough.
Visual Studio 2010 relies heavily on graphics. Therefore:
Update your video driver.
Turn off "Enable rich client visual
experience"
Turn off "Use Hardware graphics acceleration if
available"
There are also temporary files that Visual Studio uses that may need to be cleared out.
Clear out your %temp% folder.
Clear out %AppData%\Local\Microsoft\WebsiteCache
Clear out %AppData%\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
Your project and solution user settings may be corrupt due to so many "crashes".
Delete .user and .suo files (you will lose the startup project, bookmarks, breakpoints, and other user settings specific to projects and solutions.)
Begin where you began before - it may seem overkill but this is the only way to be sure we are addressing everything short of hardware issues.
Reinstall Windows - make sure you are using a validly licensed copy, and patch the hell out of it before installing Visual Studio.
Note: I doubt it is a GPU driver issue, but it never hurts to use the most up to date driver and this is the place to do it right after a fresh OS install.
Install Visual Studio .Net 2010 but do not start it up. Let it get the frameworks installed fresh.
Use Windows Update to install the VS 2010 SP1 patch, and any/all patches for .Net frameworks.
Make an images for yourself right here so you have something to build from if you need to try this again. It will save you lots of time.
Fire up Visual Studio, and test your closing before installing anything else.
If it does not work here, there's likely some conflict between PC hardware and window OS, and you should try to find this symptom in other applications to get more info.
Here's what i would be looking for:
Does it happen EVERY TIME?
Does it happen after you debug your project ? does it happen for ALL projects?
Does it also happen when you don't load any projects? (simply start the IDE and wait).
Does it happen after a debug session of your application? maybe the application is not closed properly?
Do you have any other apps running at the same time that may cause this? try reproducing with a minimal set of apps/services running.
What are you doing exactly when it starts freezing ? anything in particular?
I would try to get 2-3 memory dumps at the time of hanging, post it here as well as to MSFT people. That would be a good start.