Vscode: Code Helper using ~100% CPU

Created on 9 Dec 2017  路  7Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.18.1
  • OS Version: 10.12.6

I'm getting "Code Helper" stuck at ~100% CPU

screen shot 2017-12-08 at 22 18 24

ps a~ $ ps aux | grep 65462
coreh            65462 100.0  1.7  3492052 281544   ??  R     5:33PM 128:06.61 /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.js /Users/coreh/Projects/zimboli/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/m1/vk9trwwj3pz25vv0_jt7xtsc0000gn/T/vscode-tscancellation-da48568b3a6dd7891de0.sock* --locale en

Steps to Reproduce:

  1. Use VS Code for a suficiently long time (say, several hours) on a large enough project.
  2. A "Code Helper" process will start to use 100% CPU. Quitting VSCode does not terminate the Code Helper process, it needs to be killed from the Activity Monitor


Reproduces without extensions: _Probably_ not (?)
(It doesn't trigger immediately, or consistently, but rather after several hours using the App, and I haven't been able to conclude if it will not trigger without extensions. However the ps output seems to indicate that the offending file is /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript/out/utils/electronForkStart.js, so it's the built in TypeScript extension?)

Thanks in advance!

typescript

Most helpful comment

Code helper was going crazy almost 100% of the time I had VScode open (CPU at 60%-100%). My current working hypothesis is it was https://github.com/wix/import-cost which I started using (I think) when I tried out https://burkeknowswords.com/introducing-react-food-truck-b23ea1e2cf79

Disabling import-cost seems to bring code helpers CPUs way down (averaging around 12-20%). Then enabling it again brings me back up around (at least) 50% for code helper.

further reading: https://github.com/wix/import-cost/issues/35

All 7 comments

igore files such as
/**/node_modules

@bestvow Wouldn't that break type checks, autocomplete and "Jump to Definition" for the modules within node_modules?

@coreh Would you like to show me your extensions?

This issue was moved to Microsoft/TypeScript#20630

it also happened in normal javascript, after I open 10+ files, the cpu cost increased rapidly.

VsCode version: 1.18.1
mac os: 10.12.6

Code helper was going crazy almost 100% of the time I had VScode open (CPU at 60%-100%). My current working hypothesis is it was https://github.com/wix/import-cost which I started using (I think) when I tried out https://burkeknowswords.com/introducing-react-food-truck-b23ea1e2cf79

Disabling import-cost seems to bring code helpers CPUs way down (averaging around 12-20%). Then enabling it again brings me back up around (at least) 50% for code helper.

further reading: https://github.com/wix/import-cost/issues/35

Disabling the Import-Costs package seems to have cleared up my CPU issues with Code Helper.
Thanks all for the info.

Was this page helpful?
0 / 5 - 0 ratings