Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage / Intellisense stops working #16073

Closed
ghost opened this issue Nov 25, 2016 · 31 comments
Closed

High CPU usage / Intellisense stops working #16073

ghost opened this issue Nov 25, 2016 · 31 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues typescript Typescript support issues

Comments

@ghost
Copy link

ghost commented Nov 25, 2016

  • VSCode Version: Code 1.7.2 (7ba55c5, 2016-11-21T22:06:37.428Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:
Extension Author Version
vscode-material2-snippets deerawan 1.0.1
python donjayamanne 0.5.5
tslint eg2 0.6.4
auto-rename-tag formulahendry 0.0.8
Theme-FlatlandMonokai gerane 0.0.4
tstools iBotMedia 1.1.3
Angular2 johnpapa 1.0.2
csharp ms-vscode 1.5.3
debugger-for-chrome msjsdiag 2.2.2
Material-theme zhuangtongfa 1.0.3

Steps to Reproduce / Problem:

  1. After some hours of coding, Visual Studio Code uses constantly > 30% CPU
  2. Intellisense stopps working at that point or becomse so slow, you cannot use it.
  3. I have to close it, kill the remaining task end reopen it, then it works for a few hours.
@jrieken jrieken added the info-needed Issue requires more information from poster label Nov 25, 2016
@jrieken
Copy link
Member

jrieken commented Nov 25, 2016

@MoxxNull Can you reproduce without having extensions enabled (start code with code --disableExtensions) and when this happens what exact process is going crazy? Please include the full command including arguments - process explorer will be your friend. Thanks and Happy Coding

@ghost
Copy link
Author

ghost commented Nov 25, 2016

By the time I posted that, I realized that shoul have been the first thing to do, sorry.. I am currently running without extensions, in case that goes well I will add one by one.

I'll add more info !

@Jussif
Copy link

Jussif commented Nov 25, 2016

I have the same problem. The program stops working and then, just freezing, so I have to kill the program and reopen all the programs. I recently updated the program and today, I have been trying to solve this problem. Come on! Help!

@buu700
Copy link

buu700 commented Nov 26, 2016

I'm running into a similar issue on OS X El Capitan (case-sensitive filesystem) while working on a TypeScript project. After noticing IntelliSense stop working (specifically, mousing over something to get its type and/or documentation hangs indefinitely), I consistently find a process called Code Helper spiking my CPU above 100% until I kill it from the task manager.

Only extensions I have installed are Microsoft's "Docker Support" and "Git Blame".

@fbnlsr
Copy link
Contributor

fbnlsr commented Nov 27, 2016

@buu700 @Jussif @MoxxNull did you have at some point Crane installed on VS Code ?

I ran into the same problem last week. My VSCode started to consume a huge amount of CPU and Code Helper was taking 120% CPU. Even though I had Crane uninstalled it didn't change. I had to close Code and kill the process.

@buu700
Copy link

buu700 commented Nov 27, 2016

Nope, haven't used that one, although it's possible that I could've installed another extension with a similar issue at some point.

@ghost
Copy link
Author

ghost commented Nov 27, 2016

Me neither.. Still testing it without extensions / adding one by one. So far it seems good, but as the problem appeared after several hours this will take some time.

@Jussif
Copy link

Jussif commented Nov 27, 2016

I don't have installed that program. I only have one extension that is the python extension created by donjayamanne. Yesterday, I realized that VS Code consumed more than 50% of the CPU memory and I tried to find the Code Helper process but I didn't find it. How do you find this process on the pc @MoxxNull @fbnlsr @buu700??? Thanks for your help

@mattmacpherson
Copy link

If multiple people are having this problem, just post your list of extensions and we can narrow down the common denominator that way. Any easy way to list all active extensions?

@Jussif
Copy link

Jussif commented Nov 29, 2016

@method-x I have only one extension installed on VSCode. This extesion is PYTHON created by donjayamanne.
I am testing the following command line that was suggested by @DonJayamanne to be added to the settings.json file

"python.devOptions":["USERELEASEAUTOCOMP"]

As soon as I have results I will notify you. Thanks for your help.

@chrmarti chrmarti self-assigned this Nov 29, 2016
@chrmarti
Copy link
Collaborator

@method-x You can use code --list-extensions --show-versions. Note that this does include disabled extensions.

@buu700
Copy link

buu700 commented Nov 29, 2016

@Jussif
Copy link

Jussif commented Nov 29, 2016

I have been working adding this command line without any problem.

"python.devOptions":["USERELEASEAUTOCOMP"]

After this correction, the VSCode is working correctly without increasing the PC usage @DonJayamanne .

@chrmarti
Copy link
Collaborator

@chrmarti chrmarti added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 30, 2016
@mattmacpherson
Copy link

Well, I can at least confirm this is an extension issue. I uninstalled a few extensions I wasn't using and haven't had this issue since. I didn't keep track of the extensions I uninstalled.

@buu700
Copy link

buu700 commented Dec 9, 2016

Agreed that it's probably an extension issue. While I have still had IntelliSense randomly die on occasion since removing my git blame extension, it hasn't been nearly as frequent or been accompanied by the high CPU usage of the original issue.

@buu700
Copy link

buu700 commented Dec 24, 2016

Not sure if it's the same root cause or an entirely different issue, but I've been running into exactly these symptoms again (with no extensions enabled) since the 1.8.1 update.

@chrmarti
Copy link
Collaborator

@buu700 Could you run the command in #17740 (comment) when the problem occurs and paste the result there?

@buu700
Copy link

buu700 commented Dec 25, 2016

100.0 buu700            2268 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/out/utils/electronForkStart /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/node_modules/typescript/lib/tsserver.js --useSingleInferredProject --enableTelemetry
  0.0 buu700            2269 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/buu700/Library/Application Support/Microsoft/TypeScript --enableTelemetry
  0.0 buu700            2538 /Applications/Visual Studio Code.app/Contents/MacOS/Electron
  0.0 buu700            2539 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --type=gpu-process --channel=2538.0.680398471 --mojo-application-channel-token=7347E75BB7700540F77B571EB0F98AE5 --no-sandbox --supports-dual-gpus=false --gpu-driver-bug-workarounds=18,20,29,40,48,51,52,56,58,66,67,71,73,75 --gpu-vendor-id=0x8086 --gpu-device-id=0x0a2e --gpu-driver-vendor --gpu-driver-version --gpu-driver-date --gpu-active-vendor-id=0x8086 --gpu-active-device-id=0x0a2e
  0.0 buu700            2606 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=SharedProcess
  0.1 buu700            2609 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --type=renderer --no-sandbox --primordial-pipe-token=FC3B99B9B0762E59965A702FCE28F0F2 --lang=en-US --node-integration=true --background-color=#171717 --enable-pinch --num-raster-threads=2 --enable-zero-copy --disable-partial-raster --enable-gpu-memory-buffer-compositor-resources --content-image-texture-target=3553,3553,3553,3553,3553,34037,3553,3553,3553,3553,3553,34037,3553,34037,34037 --video-image-texture-target=3553,3553,3553,3553,3553,34037,3553,3553,3553,3553,3553,34037,3553,34037,34037 --mojo-channel-token=7166B41057C2AF2704FADCA3B4D6D8E3 --mojo-application-channel-token=FC3B99B9B0762E59965A702FCE28F0F2 --channel=2538.1.1021247908
  0.0 buu700            2610 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=extensionHost
  0.0 buu700            2611 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap --type=watcherService
  0.0 buu700            2614 /Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Resources/crashpad_handler --database=/var/folders/p8/ml7_9hzj55lbpr_17ks5tv6c0000gn/T/VSCode Crashes --url=https://ticinocrashreporter.azurewebsites.net/crash --handshake-fd=57
  0.0 buu700            2616 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap /usr/local/bin/git /Users/buu700/cyph/master utf8 /Applications/Visual Studio Code.app/Contents/MacOS/Electron 2.10.0
 99.7 buu700            2638 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/out/utils/electronForkStart /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/node_modules/typescript/lib/tsserver.js --useSingleInferredProject --enableTelemetry
  0.0 buu700            2653 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/buu700/Library/Application Support/Microsoft/TypeScript --enableTelemetry

A bit more information:

  • Closing vscode doesn't kill any Code Helper processes, so if I don't manually kill them myself, then after a few hours of quitting and reopening vscode I'll end up in situations where a large set of Code Helpers each running at ~100% CPU (often well above) stick around and keep my fans blaring. The command output above is with two of them running, and attached is a screenshot of the OS X Activity Monitor with five.

  • This seems to happen often enough no matter what I do, but it's 100% consistently reproducible specifically when I work on TypeScript files that exist outside our repo's subfolder which contains our TS project root / tsconfig.json file (standalone ts-node scripts) and try to use any IntelliSense features (peek / go to definition, mouse over method names, etc.).

screen shot 2016-12-25 at 11 01 15 am

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues and removed *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster labels Dec 29, 2016
@chrmarti chrmarti assigned mjbvz and unassigned chrmarti Dec 29, 2016
@chrmarti
Copy link
Collaborator

Reopening for the tsserver using a full CPU and staying around after closing the application. Over to you @mjbvz.

@chrmarti chrmarti reopened this Dec 29, 2016
@mjbvz mjbvz added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Jan 5, 2017
@waderyan waderyan changed the title VS Code 1.7.2 High CPU usage / Intellisense stops working High CPU usage / Intellisense stops working Jan 12, 2017
@buu700
Copy link

buu700 commented Feb 3, 2017

Any updates on this? It's still reproducible with 1.9.

Also, just went ahead and tested with vscode versions 1.4 - 1.6, and it's consistently reproducible in all of them despite my never having run into this (to my knowledge) before 1.7. Is it possible that this could be a bug in an external dependency, e.g. tsserver being referenced from my global node modules rather than from the vscode bundle?

@Toxicable
Copy link

Could we have an update on this? I have started experiencing it consistently since the 1.9 update, exact same symptoms. I have also talked to at least 3 others who are also getting it since 1.9

@vexxra
Copy link

vexxra commented Feb 17, 2017

I can't guarantee that this is happening since 1.9, but it definitely happens since some time. Intellisense suddenly stops working, CPU usage rises to ~15% from roughly 0-1% before and the ram usage spiked to over 800MB from roughly 150MB (just the highest using process, not all combined).

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

@mrmlnc
Copy link
Contributor

mrmlnc commented Feb 17, 2017

@Toxicable, @stephanjust,

Can you reproduce this problem if you disable all extensions? But I thought that the problem in the editor, because I see a lot of such messages.

@Toxicable
Copy link

@mrmlnc Just tested this, disabled all extensions, been coding for about an hour doing a node.js application in TS and now my intellisense is 100% gone, all TS support is gone, CPU is sitting at a constant 34% (on a quad core i5). This is on a windows 10 machine

@buu700
Copy link

buu700 commented May 1, 2017

I finally found a workaround for this! Looks like it's unrelated to extensions; I just added a jsconfig.json with {"exclude": ["**"]} to the root of my project and the problem seems to have gone away.

@mjbvz
Copy link
Collaborator

mjbvz commented May 1, 2017

@buu700 It sounds like you were running into microsoft/TypeScript#14636. We've added a workaround in VSCode 1.12 to limit how often this should be hit

Please give VSCode 1.12 with TS 2.3.2 a try a let me know if you are still hitting this issue. Another possible cause is microsoft/TypeScript#15301 which we are still looking into

@mjbvz mjbvz closed this as completed May 1, 2017
@buu700
Copy link

buu700 commented May 1, 2017

Awesome, I'll update and test it out; looks like I'm currently running 1.11.

@buu700
Copy link

buu700 commented May 1, 2017

Yep, can't reproduce the problem with the insiders build. Terrible time for me to finally find a workaround after dealing with this for so long, but glad it's finally properly resolved!

@zapkub
Copy link

zapkub commented May 4, 2017

I also have a problem with intellisense when I use graphql because AST type guide is too long

to reproduce

  • add react-apollo
  • import { graphql } from 'react-apollo'
  • intellisense will break after try to suggestion graphql object type

screen shot 2560-05-04 at 5 05 30 pm

@buu700
Copy link

buu700 commented May 22, 2017

It's much more infrequent now, but I have still been occasionally running into these exact symptoms (Code Helper processes hanging around after vscode is closed and using high CPU).

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests