Bug: Battery drain even when app off due to Shan.code-settings-sync extension
See original GitHub issueIssue Type: Performance Issue
on brand new Apple 2022 Macbook Pro 14" M1
- download vscode (universal mac version)
- watch battery drain
I had >90% power 2hr ago and now I’m down to 46%, and I was using chrome but my mac tells me that vscode was using more power than anything else EVEN THOUGH I HAD YET TO TURN IT ON TODAY
Please look at this insane amount of battery usage for an app that’s turned off:
Update: It looks like there was a Code Helper (Renderer) (50803) task running from vscode that was using half of my CPU. I stopped that process. I opened vscode up again and it seems to be using a reasonable amount of CPU now (both that task and the Electron/other vscode-related tasks in total, that is). so maybe a background task just doesn’t quit and slowly snowballs over time.
Update: Looks like everything is going fine now! So it must be due to some task that gets started right after install or first startup. Below, you can see my usage with vscode off and before I turned that task off, then I charged my comp, then I reopened vscode to do things and it’s consuming expected amount of power.
VS Code version: Code 1.66.2 (Universal) (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:49:20.994Z) OS version: Darwin arm64 21.1.0 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Apple M1 Pro (10 x 24) |
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) | 8, 8, 8 |
Memory (System) | 16.00GB (0.20GB free) |
Process Argv | –crash-reporter-id 8fff6564-6630-48c8-8217-d84848fc2769 |
Screen Reader | no |
VM | 0% |
Process Info
CPU % Mem MB PID Process
26 213 47499 code main
0 66 47506 gpu-process
0 33 47508 utility-network-service
0 279 47509 window (Get Started)
1 164 47532 shared-process
3 66 47535 ptyHost
1 49 47560 fileWatcher
0 0 47605 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
3 98 47534 extensionHost
0 98 47591 issue-reporter
Workspace Info
;
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebugcf:30466690
vscaac:30438847
Issue Analytics
- State:
- Created a year ago
- Reactions:35
- Comments:37 (8 by maintainers)
Top GitHub Comments
I really hope there is one soon… My 16 inch MBP 2021 went from full to 10% in under two hours. It hit 198 in the energy tab of activity monitor, and it hit 432% cpu usage… Crazy bug!
Kill the process
Code Helper (Renderer)
in activity monitor. After that it works fine for me.Related ticket: https://github.com/microsoft/vscode/issues/101555