HACKER Q&A
📣 nomilk

Why does VSCode fully drain MacBook Pro (M2) battery in 2hrs?


Why does VSCode fully drain MacBook Pro (M2) battery in 2hrs?


  👤 animuchan Accepted Answer ✓
I second the "check the extensions" answer, because for me it sure doesn't — when working from home, I only charge a similar machine (M2 MBP) at night, so it's good for at least 9 hours of work, where work == VS Code + Slack + Zoom.

👤 jotaen
This is more like an Ask HN, isn’t it?

https://news.ycombinator.com/showhn.html


👤 FBISurveillance
I suggest you to check your extensions. Local LLMs, language server bugs, maybe even a compromised extension that mines crypto?

👤 nomilk
FWIW, I rebooted and VSCode's energy usage is back to normal (less than 1/10th of what it was while it was consuming extremely high amounts of energy).

https://imgur.com/rFXkoin


👤 nomilk
According to 9to5mac [1], my 2023 16" MBP should have around 14 hours of "wireless web battery".

Today it lasted 2 hours flat. I had around 5 smallish files open in vscode and wasn't doing anything at all interesting or intensive (no docker, no automated testing, just writing code, and pretty slowly, frankly).

[1] https://9to5mac.com/2023/10/30/m3-macbook-pro-battery-life/