42

I recently installed Visual Studio 2013 Professional Update 2 on a Windows 7 virtual machine. I had been running VS 2012 with no problems, but I wanted to upgrade. Everything was working well for a week, but now for a certain project the IDE is bogging down and task manager is reporting a consistent 25% CPU usage on my 4 core machine. Restarting VS and my PC does nothing.

If I start VS in safemode devenv.exe /SafeMode the problem goes away, and it is project-specific.

I've run Process Explorer and discovered this thread
(note: not the highlighted one but the thread on top)

IsAssertEtwEnabled

Then I found this forum related to it: https://connect.microsoft.com/VisualStudio/feedback/details/873579/high-cpu-usage-possibly-after-updating-to-update-2 But I don't have either Power Tools or Alternating Line Color extensions installed.

If it's not any extensions (I haven't added any), what could the issue be? The only thing I can think of is the NuGet packages.

EDIT I found this thread Asp.Net CPU issue working with Kendo UI treeview after Visual Studio 2013 Update 2 and tried the solution of disabling Browser Link to no avail.

EDIT I also disabled Source Control as described here VS2013 permanent CPU usage even though in idle mode but apparently it is not fixed in Update 2 as the question states.

EDIT debugging and pausing the culprit thread (main thread) gives me this stack trace more often than not: stack trace

Community
  • 1
  • 1
Clint Powell
  • 2,368
  • 2
  • 16
  • 19
  • 8
    To whoever voted that this question is "too broad", how can I narrow it down? The culprit thread is given and I've laid out the steps I've taken to debug and what possible causes I've researched. I think the question is fairly narrow relating to a specific thread in Visual Studio. – Clint Powell Jul 04 '14 at 19:05
  • 2
    If you attach a debugger (i.e. use VS to attach to VS) and pause repeatedly, what is the usual callstack of the offending thread? (You can right-click on the callstack and choose 'Load Symbols' to get the actual function names, since MS publishes public symbols for all their products.) – Cameron Jul 04 '14 at 19:13
  • See last edit for stack trace. – Clint Powell Jul 04 '14 at 19:26
  • Aha, thanks. Could you scroll to the right a bit more? Also, if you type `path` into the immediate or watch window, what is its value? Is it a path to one of your project's files? – Cameron Jul 04 '14 at 19:29
  • http://pastebin.com/StePqEUM for the full stack trace. The `path` seems to be cycling through all my javascript files in the project path (we use bower so there's a bunch). – Clint Powell Jul 04 '14 at 21:37
  • 2
    That's a *very* awkward stack trace, hopefully there's some code that removes the item from the collection again or you'll run out of memory in a hurry. You are going to have to do the leg-work, nobody can debug those add-ins for you. Disable them one at a time until you find the evil-doer. – Hans Passant Jul 04 '14 at 21:43
  • I installed 2013 fresh a couple days ago and have not added anything. How do I disable built-in plugins / extensions? – Clint Powell Jul 04 '14 at 21:47
  • What type of project is it? I have VS2013 Update 2 and works fine. I only code C/C++. – remus Jan 16 '15 at 22:34
  • I see the same problem in my Windows 10 VM with VS2015 Update 5. It doesn't always happen -- lots of times VS idles at close to 0 CPU usage. It seems to trigger after running for a while, and at least once it seemed to occur directly after running a rename refactor. This is on a non-web C# project so the Browser Link solution doesn't apply in my case either. Very frustrating. – rationull Sep 22 '15 at 05:41

9 Answers9

82

I have been struggling with the same issue for a couple of days on Visual Studio 2013 Update 4.

Disabling "Enable Browser Link" option in here:

enable browser link

Fixed the issue for me.

apostolov
  • 1,646
  • 16
  • 20
  • 1
    The browerlink also caused huge memory problems in each browser for me. Pegged the CPU at about 20% for IE, Firefox, and Chrome, and mem usage would go up about 20 meg every couple of seconds. – LarryBud Dec 30 '14 at 19:20
  • Looks like that may have been my issue as well (over the past few weeks I've also disabled other extensions, including disabling source control - set to none.) I can't believe how quiet it is in here, now that the fan to my poor little laptop doesn't sound like a jet plane taking off. – Cody Jan 13 '15 at 23:02
  • Had Procexp.exe running at the exact same time that my CPU was spiking.. and as soon as I disabled browser link, my CPU dropped to normal levels.. – Alex Dresko Jan 26 '15 at 14:18
  • Fixed my issue, when I used Chrome Developer Tools, they took 2gb of RAM !! Disabling browser link fixed that too ! – Umair Oct 12 '15 at 15:13
  • ... you're my hero ! Real shame that this feature (being able to see markup changes on the fly) has such a major downside – Don Cheadle Mar 07 '16 at 16:00
7

All I've found thus far is a workaround: unload and reload the startup project of my solution in the Solution Explorer after opening the project. This will return the cpu usage down to normal (~0% idle).

Clint Powell
  • 2,368
  • 2
  • 16
  • 19
  • 1
    OK so now you have another angle than plugins. What's special about that project? Just for testing purposes, what happens if you remove most of the files from the project? What references or nugets are there? Do you have a circular dependency on another project somehow? – demoncodemonkey Jul 05 '14 at 06:04
  • 1
    I removed all projects except the startup project, and then removed all references (even System) and all files from the project. Now it fluctuates every second between 5-10% and 25%. An empty project is doing this! I even reset my settings to default. – Clint Powell Jul 05 '14 at 16:44
  • Sorry, not sure what's left to try other than to reinstall VS :( – demoncodemonkey Jul 05 '14 at 21:29
  • 1
    thanks Clint, your answer solved my problem. (VS2013 - Update 3) – BillD Aug 20 '14 at 18:28
  • Your answer fixed mine as well. (VS2013 - Update 3) – Arctic Oct 20 '14 at 19:02
4

From what I can tell from Googling Microsoft.VisualStudio.JavaScript.Web.Extensions.dll, that DLL is related to the Web Essentials plugin. If you disable that plugin in particular (failing that, all plugins), does the problem go away?

If it is a problem with a plugin, either live with it being disabled or contact the developer.

demoncodemonkey
  • 11,730
  • 10
  • 61
  • 103
  • I don't have the Web Essentials plugin installed. As I mentioned, if I start with SafeMode enabled (supposedly just runs with default settings and no extensions) it does solve the problem. – Clint Powell Jul 04 '14 at 21:40
  • 1
    Shoot. Well worth a shot for someone else perhaps. Darn VS. – Matt J. Jul 04 '14 at 21:41
3

I know this thread is getting a little old but just in case this helps someone else...
I also have this issue and I can definitely put it down to Web Essentials in my case. But, more specifically, Web Essentials once I open up a .less or .css file in the IDE.

I have restarted the IDE and the usage goes back to normal but again as soon as I open a css file the CPU starts to climb then the whole IDE becomes unusably slow. Closing all less/css files does seem to bring the CPU/IDE back to earth eventually.

My 2 workarounds so far:

  1. Uninstall WE    :-(
  2. Edit my .less and .css in Notepad++ and use the IDE for everything else

Neither is a particularly great solution!

This is with VS2013 Pro + Update 2 and the latest release build of WE. Next step is to see if VS update 3 RC + latest nightly build of WE has the same problem.

Edit: A thought has just occurred. I have only recently had to change from VS Premium to VS Pro and I don't recall the problem happening with the Premium version. I wonder if it is just the Pro version??

shunty
  • 3,699
  • 1
  • 22
  • 27
  • Thanks for the tip! I don't edit any less, css, or sass in Visual Studio (use Sublime for my web dev stuff), but this will hopefully help someone who has your variation of this issue. – Clint Powell Jul 30 '14 at 16:23
  • I had the same issue in VS 2013 Premium w/ Update 4, disabled "Browser Link" and CPU usages immediately dropped to normal. – Ty H. Jan 08 '15 at 17:29
2

I know you said you have no extensions, but you might want to double-check on this one. It looks like the Web Essentials extension is incompatible with VS 2013 Update 2 and may cause the described behavior. The workaround is to download the latest nightly build of Web Essentials. You'll have to do it by hand as the one last stable release on Nuget is several months old, before this fix.

More info and download links here.

Matt J.
  • 1,780
  • 1
  • 14
  • 17
2

I had a similar problem here (25-30% CPU usage) and a message complaining about Microsoft SQL Server Compact 4.0 not being installed (not sure why, it was supposed to be installed with Visual Studio).

After downloading and installing it separately, the CPU usage issue was solved.

feliposz
  • 31
  • 1
  • 4
1

My CPU load was 15-25% on a core i7 and went down to 0% after deleting the .sdf files in my project folders.

arkod
  • 1,973
  • 1
  • 20
  • 20
0

For what it's worth, I had similar issue with Server Compact 4 being missing, and my c++ solutions being at 25% cpu usage all the time. I had Server Compact 4 SP1 installed though. My system is Windows 7 64 bit. I uninstalled SP1 and downloaded and installed Server Compact 4 and now everything is ok. I have of course got Intellisense back as well.

rezeli
  • 143
  • 2
0

I just had this issue; for me it was resolved by installing Update 5.

The issue started occurring after installing the latest MS Updates; a full list of which are given below (NB: my date format is UK: DD/MM/YYYY; today is 10/12/2015 - some fixes listed were (will be?) allegedly installed on the 11th):

get-hotfix `
| ?{$_.InstalledOn -gt ((get-date).AddDays(-7))} `
| ft Description, HotfixId, InstalledOn -AutoSize

Description     HotfixId  InstalledOn        
-----------     --------  -----------        
Security Update KB3046017 08/12/2015 00:00:00
Security Update KB3060716 08/12/2015 00:00:00
Update          KB3064209 08/12/2015 00:00:00
Security Update KB3071756 08/12/2015 00:00:00
Security Update KB3072305 08/12/2015 00:00:00
Security Update KB3075220 08/12/2015 00:00:00
Update          KB3075851 08/12/2015 00:00:00
Security Update KB3076895 08/12/2015 00:00:00
Security Update KB3076949 08/12/2015 00:00:00
Security Update KB3078071 08/12/2015 00:00:00
Security Update KB3078601 08/12/2015 00:00:00
Security Update KB3079757 08/12/2015 00:00:00
Security Update KB3081320 11/12/2015 00:00:00
Security Update KB3092601 11/12/2015 00:00:00
Security Update KB3100773 11/12/2015 00:00:00
Security Update KB3101246 11/12/2015 00:00:00
Security Update KB3101722 11/12/2015 00:00:00
Security Update KB3101746 11/12/2015 00:00:00
Update          KB3102810 11/12/2015 00:00:00

Earlier (before using Visual Studio / noticing the issue) I'd uninstalled another hotfix relating to Outlook, which had caused it to open in Safe Mode.

JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
  • (this only temporarily stopped the issue; after another reboot the problem returned; despite no projects being open (thus browser link not in use)) – JohnLBevan Dec 11 '15 at 14:44