High extenstionHost CPU usage when Settings Sync is enabled
See original GitHub issueIssue Type: Performance Issue
My Macbook got very hot and drained its battery within about 1 hour with 6…8 VSCode windows opened (with each window being placed on a separate desktop).
For each window, there was a “Code Helper” process that consumed about 30…40% CPU constantly, no matter if the winwods were in focus or not. Using ps aux
and the PID taken from the Activity Monitor, it turned out the extensionHost seems to cause the high CPU usage.
Following some info from the web, I did an extension bisect with one instance/window of VSCode opened and used ps -eo pcpu,pid,command | grep Code | grep extensionHost
in order to check CPU consumption on the extension host, setting the result to “good” or “bad” depending on wether the CPU usage stayed above 30% or not.
The extension bisection identified Settings Sync as the “faulty” plugin. After disabling, even when opening multiple windows, only the currently focused window had any relevant CPU usage, most other processes stayed in the <1% range.
Extension version: 3.4.3 VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z) OS version: Darwin x64 21.5.0 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-9750H CPU @ 2.60GHz (12 x 2600) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
Load (avg) | 2, 4, 7 |
Memory (System) | 16.00GB (0.47GB free) |
Process Argv | –crash-reporter-id 6df23f80-4b47-430d-9220-cd92baff39d1 |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550
Issue Analytics
- State:
- Created a year ago
- Reactions:11
- Comments:8
Top GitHub Comments
Unfortunately this extension hasn’t been updated in nearly 4 years and I doubt @shanalikhan will fix it now, specially since there’s a built-in alternative available. I also have loved this extension but will have to try out the alternative now. I guess it’s not so easy to fork a vscode extension and point vscode to use your own fork? or else someone could “easily” just disable the “file watching” part of the code… no idea what that was even ever put in exactly.
This extension has basically been driving me nuts for over a year (or more) with constant battery drain. Hell this extension probably caused a 100+ battery cycles to deplete just because I never until now had the will to turn off all my extensions one by one and finally find out wtf is causing all the battery drainage… oh well… at least from now on my laptop won’t burn a hole in my lap anymore ;p
On my 16in M1 Max… with this extension turned on Code Helper takes 150% CPU for every vscode instance (including completely IDLE ones!!!)… and I often have 2+ of these opened. Without this extension, it takes 0% when IDLE! =/
absolute insanity, been suffering from over heating and bad battery life on my fullspeced M1 mbp 14, 100% cpu usage when running this extension, now down to single digits
absolute shame, this has caused me a lot of grief and over what? syncing settings 😕