question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Battery drain even when app off due to Shan.code-settings-sync extension

See original GitHub issue

Issue Type: Performance Issue

on brand new Apple 2022 Macbook Pro 14" M1

  1. download vscode (universal mac version)
  2. 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

image

Please look at this insane amount of battery usage for an app that’s turned off:

image

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.

image

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
;
Extensions: none
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:open
  • Created a year ago
  • Reactions:35
  • Comments:37 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
CreeperMaster719commented, Jul 22, 2022

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!

3reactions
madhusudhandcommented, Jul 20, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android bug causing phone battery drain - Here's how to fix it
Android users report an issue causing their phone batteries to drain faster than usual. Here's a quick fix.
Read more >
iOS 16 Causing Battery Drain? Three Possible Reasons Why ...
Sometimes after a major update, your ‌iPhone‌ could be glitched and bugged out, and a simple restart could resolve it and bring your...
Read more >
Why your Android battery is draining fast and how to fix it
Not sure why your phone battery is dying so quickly? Learn what's causing battery drain and how to stop it on your Android...
Read more >
iOS 16 Battery Life Draining Fast on iPhone? Here's Why ...
Often plugging in an iPhone and letting it charge overnight while connected to wi-fi is enough to let this complete and work itself...
Read more >
Get the most life from your Android device's battery
You can take several actions to extend your device's battery life and make a charge last longer. Tip: Your device's battery life depends...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found