Vscode: High CPU usage by Code Helper

Created on 28 Dec 2017  Â·  14Comments  Â·  Source: microsoft/vscode

  • VSCode Version: Version 1.19.1
  • OS Version: High Sierra 10.13.2

Steps to Reproduce:

  1. Open VSCode
  2. Use with terminal and two tabs with vertical layout
  3. Wait

Reproduces without extensions: Yes

*caused-by-extension integrated-terminal mac needs more info

Most helpful comment

Issue is fixed in import-cost version 2.6.2, sorry for the trouble...

All 14 comments

I have noticed this as well on my Mac as well.

While you're experiencing the problem could you run code --status and paste in the output? This gives a detailed look at the cpu/memory of each of the many processes created by vscode.

This is happening to me as well.. my output is:

`code --status
[5156:1229/085203.246894:WARNING:dns_config_service_posix.cc(154)] dns_config has unhandled options!

Version: Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:35:14.671Z)
OS Version: Darwin x64 17.3.0)
CPUs: Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz (8 x 2900)
Memory (System): 16.00GB (1.86GB free)
Load (avg): 8, 16, 15
VM: 0%
Screen Reader: no

CPU % Mem MB Process
0 98 code main
0 82 gpu-process
18 279 window (admin.js — crm)
0 115 watcherService
2 360 extensionHost
0 66 electron_node server.js
0 197 electron_node electronForkStart.js tsserver.js
0 49 electron_node typingsInstaller.js tsserver.js typesMap.js
85 66 extensionHost
87 82 extensionHost
87 66 extensionHost
86 66 extensionHost
89 66 extensionHost
18 33 extensionHost
0 49 searchService
0 82 shared-process

Workspace Stats:
| Window (admin.js — crm)
| Folder (crm): 13953 files
| File types: php(8541) js(735) json(584) svg(521) css(501) png(271)
| md(262) phpt(200) data(189) xml(174)
| Conf files: makefile(6) settings.json(1) package.json(1)`

It seems that disabling 'import cost' plugin fixes the problem.. now back at normal CPU level..

i have same problem。 and i disable 'import cost',but High CPU usage by Code Helper . code --status information @Tyriar

Version:          Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:35:14.671Z)
OS Version:       Darwin x64 17.3.0)
CPUs:             Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2700)
Memory (System):  16.00GB (0.48GB free)
Load (avg):       9, 10, 8
VM:               20%
Screen Reader:    no

CPU %   Mem MB  Process
   10      180  code main
    1      131     gpu-process
    0       82     shared-process
    0      246     window (index.js — ui-nodewap-appeal)
    0       16       terminal
    0        0         /bin/zsh -l
    0       33       watcherService
    0      164       extensionHost
    0       66         electron_node server.js
    0      131         electron_node electronForkStart.js tsserver.js
    0       49           electron_node typingsInstaller.js tsserver.js typesMap.js
    0       33         electron_node server.js
    0       33         electron_node jsonServerMain.js
    0       49         electron_node htmlServerMain.js
    0       82         extensionHost
   68       82         extensionHost
   72       82         extensionHost
   71       82         (Code Helper)
   74       82         (Code Helper)
   68       66         extensionHost
   73       66         (Code Helper)
    0       16         extensionHost
    0       16       searchService
    6      246     window (Form.jsx — ReactFrom)
    0       33       terminal
    0        0         /bin/zsh -l
    0        0           bash /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code --status
    5       33             electron_node cli.js
    0       49       watcherService
    0      115       extensionHost
    0       66         electron_node server.js
    0       82         electron_node electronForkStart.js tsserver.js
    0       49           electron_node typingsInstaller.js tsserver.js typesMap.js
    0       82         electron_node server.js
    0       49       searchService

Workspace Stats:
|  Window (index.js — ui-nodewap-appeal)
|    Folder (ui-nodewap-appeal): 494 files
|      File types: js(240) png(56) jsx(49) ts(39) css(35) styl(34) json(9)
|                  xml(6) tpl(6) DS_Store(5)
|      Conf files: package.json(2) tsconfig.json(1)
|  Window (Form.jsx — ReactFrom)
|    Folder (ReactFrom): 10 files
|      File types: js(2) babelrc(1) gitignore(1) md(1) jsx(1) styl(1) html(1)
|                  json(1) lock(1)
|      Conf files: package.json(1) webpack.config.js(1)

@zhiqiang21

   68       82         extensionHost
   72       82         extensionHost
   71       82         (Code Helper)
   74       82         (Code Helper)
   68       66         extensionHost
   73       66         (Code Helper)

It looks like an extension might be the problem, have you tried running with code --disable-extensions?

@sietzekeuning the same, it's likely an extension in your case. Try running with code --disable-extensions and if the problem is fixed you can try find the problem extension.

85  66  extensionHost
87  82  extensionHost
87  66  extensionHost
86  66  extensionHost
89  66  extensionHost
18  33  extensionHost

@Tyriar

Version:          Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:35:14.671Z)
OS Version:       Darwin x64 17.3.0)
CPUs:             Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz (4 x 2900)
Memory (System):  16.00GB (0.13GB free)
Load (avg):       3, 4, 4
VM:               0%
Screen Reader:    no

CPU %   Mem MB  Process
    0       82  code main
    0      131     gpu-process
    0      295     window (authenticated-layout.js — strategies-marketplace-frontend)
    0       33       watcherService
    0      147       extensionHost
    0      147         electron_node electronForkStart.js tsserver.js 
    0       33           electron_node typingsInstaller.js tsserver.js typesMap.js 
    0       49         electron_node jsonServerMain.js 
    1       82         extensionHost
   58       49         extensionHost
   59       49         extensionHost
   58       49         extensionHost
    0       33       terminal
    0        0         /bin/zsh -l
    0       16           node /usr/local/bin/yarn dev
    0       16             node /Users/matej/dev/strategies-marketplace-frontend/node_modules/.bin/concurrently yarn run dev:client yarn run dev:server
    0       16               node /usr/local/bin/yarn run dev:client
    0      131                 node /Users/matej/dev/strategies-marketplace-frontend/node_modules/.bin/webpack --watch
    0       16               node /usr/local/bin/yarn run dev:server
    0       16                 node /Users/matej/dev/strategies-marketplace-frontend/node_modules/.bin/nodemon -w index.js -w config.js -w .env -w server --quiet
    0       49                   electron_node index.js 
    0       33       searchService
    0       66     shared-process

Workspace Stats: 
|  Window (authenticated-layout.js — strategies-marketplace-frontend)
|    Folder (strategies-marketplace-frontend): 104 files
|      File types: js(81) DS_Store(4) md(4) png(3) json(2) yml(1) gitignore(1)
|                  babelrc(1) env(1) css(1)
|      Conf files: package.json(1) webpack.config.js(1)

Is there a way to know exactly which extension is causing this?

@Math3v I don't think so, other than disabling each and checking. I'm going to close these off as it looks like an extension is to blame.

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

Wrong label :smile:

Issue is fixed in import-cost version 2.6.2, sorry for the trouble...

Not sure what electron_node electronForkStart.js tsserver.js handles but this seems to be what has been throttling my system lately. I guess I'll start going through extensions, but it would be nice if I could determine what that is related to.

I'm using VSCode on a mac; version output below

1.20.0
c63189deaa8e620f650cc28792b8f5f3363f2c5b
x64
CPU %   Mem MB  Process
    5       49  code main
    0       33     gpu-process
    0      131     window (Extension: TypeLens — op-phone-service)
    0       16       terminal
    0        0         /bin/zsh -l
    0       16       watcherService
    0       82       extensionHost
    0       16         electron_node server.js
   88     1196         electron_node electronForkStart.js tsserver.js
    0       16           electron_node typingsInstaller.js tsserver.js typesMap.js
    0       16         electron_node server.js
    0       16         electron_node server.js
    0       16         electron_node jsonServerMain.js
    0       16         electron_node htmlServerMain.js
    0       16       searchService
    0       33     shared-process
    0       33     window (undefined)

Another snapshot from today 2/8/2018

CPU %   Mem MB     PID  Process
    2       66    8106  code main
    0       33    8111     gpu-process
    0       33    8114     shared-process
    0      180    9919     window (testing.bundle.js (Working Tree) — op-phone-service)
    0      147    9922       extensionHost
    0       16    9942         electron_node htmlServerMain.js
   83       16    9957         electron_node server.js
    0       16   10005         electron_node jsonServerMain.js
    0       16   10025         electron_node server.js
    0       16   10028         electron_node server.js
   77     1819   10029         electron_node electronForkStart.js tsserver.js
    0       16   10040           electron_node typingsInstaller.js tsserver.js typesMap.js
    0       16    9923       watcherService
    0       16    9950       searchService
    0       16   10101       terminal
    0        0   10102         /bin/zsh -l

/cc @mjbvz

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mariusa picture mariusa  Â·  219Comments

Perkovec picture Perkovec  Â·  191Comments

Tekbr picture Tekbr  Â·  191Comments

filfat picture filfat  Â·  246Comments

fabiopicchi picture fabiopicchi  Â·  192Comments