I am using Visual Studio Professional 2017 15.2 (26430.14) and my CPU is between 40-60% on my PC everytime I am writing code. It is really anying since it creates a lag for every character input. Sometimes several seconds. I should state that my PC is not of the most performant kind, but I do have SSD and 16 GB of RAM.
I have Resharper and NCrunch installed, but I have tried to disabled them, but without any result.
The process that spikes the CPU is:
devenv.exe
And also sometimes:
ServiceHub.RoslynCodeAnalysisService32.exe
The cause of my problem was something called "CodeLens" (https://msdn.microsoft.com/library/dn269218.aspx). This is some kind of realtime analysis of the code giving you references and usage direct within the code. I guess it was a little bit to hard on my weak machine.
When I turned this feature off my lag disappeared instantly. You can turn it off here:
Options
Text Editor
All Languages
CodeLens
Related
I was happily debugging some C# code in Visual Studio 2015 when I started to notice that a VsHub related process (Microsoft.VsHub.HttpHost64.exe) was going bananas with memory consumption and slowing my whole system.
and even after I close the application I was debugging and Visual Studio it still was consuming memory.
This keeps happening and makes debugging with Visual Studio a little bit frustrating... when this stuff is consuming more than twice the memory your own program is allocating.
Anyone having the same issue and solve it (without deleting/renaming the executable)?
Any thoughts?
I'm running a web application with models defined in C# and views being in HTML5, client-side business logic is JavaScript/jQuery. I've noticed something odd recently. Whenever both Visual Studio and my web application are running simultaneously, the browser memory usage starts to climb. It is worse in IE and Chrome, but likewise substantial in Firefox (all the latest versions of these browsers). Also, the memory usage of Visual Studio starts to climb. The CPU usage for the browser hovers in the teens, normally hovering around 0 otherwise.
Once I close down either the web application, or Visual Studio, the memory stops growing, and indeed, closing Visual Studio often allows the browser to run its garbage collection and clean up the mess. I suspect this has something to do with some sort of background debugging going on. I'm surprised that googling this hasn't turned up a similar issue for somebody somewhere in the world, and I suspect it's some kind of configuration setting in my IDE. Visual Studio 2013 Premium. I've reset my settings (Tools -> Import and Export Settings -> Reset all settings, with no effect. Building in Release mode likewise seems to have no effect. I'll keep hunting this one down, but has anyone here seen anything like this and resolved it?
edit: I have recently been debugging some dynamic code using the debugger keyword. I've commented that out, and am still seeing the same results. But I wonder if there isn't some lingering effect from using this in the first place?
edit: Updating Resharper from 8.2 to 9.2 didn't help either.
edit: Apparently this issue has been seen before and reported, if you just know what to google for.
Visual Studio has a browser link feature that causes the web app to poll Visual Studio in case you have changed a file.
In VS there is a small refresh icon in the debug menu with a drop down. In there you can disable this feature.
Did you trying running the application without debugging? (Ctrl+F5)
To enable VS debug the browser more info is needed specifically things like scripts and eval code are needed even after use. So, running the browser with debugging enabled will use more memory and cause memory to grow with time.
we are using Visual Studio 2013 with latest updates installed. Our solution(s) contains about 20 to 30 C# library and asp.net projects. We also have some extensions installed such as Resharper, VSCommands and NCrunch (all latest versions as well).
After working a couple of minutes on a solution the memory of Visual studio increases to more than 2GB of RAM. The IDE is becoming very unresponsive.
Usually i have to close a solution after working with it after 1 or 2 hours.
When not closing VS myself the RAM usage goes up to 3GB+ and VS crashes (probably because VS is still a 32bit application)
How can i identify what causes Visual Studio to use so much memory?
Thanks
(I realized that ncrunch is also using a lot of RAM when executing our tests. Therefor i have disabled it. It takes a couple of minutes longer for VS to use so much ram when ncrunch is disabled but the problem remains)
Ran into a similar scenario on my end. But mine was purely resharper.
I had personally used the following things to optimize the performance.
http://confluence.jetbrains.com/display/NETCOM/Ultimate+Guide+to+Speeding+Up+ReSharper+(and+Visual+Studio)
For huge projects, I usually turn off the solution wide analysis for it.
We identified that the latest perforce plugin for visual studio (p4vs: p4vs11_2014.2.93.1619.vsix) was the cause for VS to grow in memory usage.
We downgraded to p4vs11_2013.3.78.1524.vsix. This fixed the problem.
(Also it seems that p4vs11_2014.1.85.4506.vsix is still working)
I've been working on an intermediate-sized project in Visual Studio 2013 in C#/WPF. It relies on the Kinect SDK, and there are a good number of objects implemented in the code. When I run the debug cycle the first time (using the release configuration), execution is pretty speedy. On subsequent runs, the execution (especially of the code to connect to the... erm... Kinect) slows down significantly. I was wondering what could cause this, and what I could do to diagnose it. Are there any benchmarks in Visual Studio or things I could do to make the slowdown go away?
There is a debate going in our department to virtualize Visual Studio into App-V, Microsofts Application Virtualization. In the back of my mind, I think doing this will cause problems when trying to debug or run other tasks in Visual Studio but I can't put my finger on any one thing to support my argument.
Has anyone had any experience with Visual Studio 2010 running inside App-V?
I am open to the idea if there are no issues but I am afraid that if this is put in place, we will have issues.
What do you think?
Based on the description of App-V here I'd be shocked if the performance was good enough for Visual Studio to be usable. VS is a very processor and IO intensive application. Virtualizing its entire operation over the wire is likely drag performance down to unacceptable levels.
I have seen VS perform acceptably on local VMs running VirtualBox, that might be another option for you if platform standardization is your goal.
I know this is an ancient question, but I found it in a Google search. Just wanted to mention that we've been running Visual Studio 2010 this way for a couple of years, and it's fine. We use it in both a classroom setting and on developer desktops.