6 ms·
According to the OP, the culprit is VSCode: https://twitter.com/brian_lovin/status/1628505684504625152 https://twitter.com/brian_lovin/status/162850568450462515
by mrtksn 4y ago
According to the OP, the culprit is VSCode: https://twitter.com/brian_lovin/status/1628505684504625152 https://twitter.com/brian_lovin/status/1628505684504625152
On my 1 y/o M1 Air I consistently get over 10hrs mixed use. Coding itself is not compute intensive at all but someone is using some build systems, VMs. Docker etc. these things constantly compute stuff and as a result the battery is decimated.
The modern Dev environments are ridiculous, no matter what people say coding Swift on XCode is a breeze. Even if you do dynamic previews with SwiftUI and use simulators, it's still lighter than some web dev stuff.
- Hamuko 4y agoMy first guess would've been a JetBrains IDE. I don't personally use one but my coworkers are constantly complaining about battery drain.
- jareklupinski 4y agoI keep forgetting to turn off the django dev server launched by PyCharm until I notice that my battery is dropping
- DrBazza 4y agoExcept I run CLion for 8 hrs a day on my newish MBP M1Pro and generally end the day with 20-30% charge left. Maybe I'm not thrashing it hard enough.
- 999900000999 4y agoAny good alternatives for C#, or anyway to make VS Code less draining
- hprotagonist 4y agoRider? https://www.jetbrains.com/rider/ https://www.jetbrains.com/rider/ edit: https://github.com/OmniSharp https://github.com/OmniSharp exists, and is LSP-ish, but I have never used it.
- tsgagnon 4y agoJetBrains Rider is a cross-platform .NET IDE based on the IntelliJ platform and ReSharper. It's been years since I've used Resharper and maybe things have changed, but if you are looking to improve battery life, it's one of the last things I would start using.
- quaffapint 4y agoI use Rider daily on an M1 and easily get through the day. I'm not compiling every second, but using it pretty consistently along with slack/chrome/etc.
- kelsolaar 4y agoAs much as I love Jetbrains applications and use them daily, they are battery hogs. PyCharm will deplete my M1 battery in a handful of hours.
- xupybd 4y agoBattery and ram hogs. My work laptop is often at full ram usage (16mb) with the fans spinning at full speed. I used to code in vim and sublime text. The change in system load is shocking. I like Rider and will continue to use it but it's crazy how much of a hog it is.
- phkahler 4y agoMy guess would be to turn off all features except syntax hilighting. Without that you may as well use notepad.
- supriyo-biswas 4y agoGet a $10 VPS and use the SSH extension to connect and develop stuff remotely.
- elliottkember 4y agohttps://code.visualstudio.com/blogs/2021/02/16/extension-bisect https://code.visualstudio.com/blogs/2021/02/16/extension-bis...
- kcartlidge 4y ago> Any good alternatives for C#, or anyway to make VS Code less draining I've used VS Code, Rider, and even VS2022 via Parallels, and in the end I switched to VS Mac. It had been a year or so since I last really tried it and in that time it had gone native ARM (faster and less battery drain) and been much improved. Unless I need legacy stuff or Windows-only dev, I now see no reason to use anything other than Visual Studio Mac on my M1 Air for C# development.
- jonhohle 4y agoIt’s not for everybody, but choose a good text editor with syntax features, read documentation and related code, use a lightweight build system, and write without an IDE. It’s really not that difficult, is transferable to any framework or language, and forces you to learn APIs and code bases. In the past 20 years I’ve used Vim to write PHP, Java, Bash, C, C++, Ruby, Perl, JavaScript, Objective-C, Swift, a proprietary S-expression language, and documents in LaTeX. This isn’t something I drop into occasionally, it’s my primary editor used along side compilers and interpreters. I’ve never once said, Vim doesn’t start fast enough or is taking too much memory (though I have caused it to hang based on my own dumb search or replace commands). There are plenty of native text editors that work just as well. On the Mac I’ve had great experiences with BBEdit, TextMate, and SubEthaEdit. Other people like Sublime. There really is no shortage of great text editors. Developers need to start treating electron apps like the plague. They are merely low effort attempts at cross platform tools written in the most user hostile way.
- tzhenghao 4y agoVsCode extensions contribute significantly to battery drain as well. The more extensions you have running, coupled with a larger codebase, the more compute needed to reindex for autocompletion, warnings etc.
- unethical_ban 4y agoIs it just me, or is VSCode kind of confusing on how exactly everything works/integrates? When I've tried using it for Python work, getting it to use the right venv/binary seemed difficult and it has all these add-ons that I don't know where they're installed or fetched from. I feel old. I just want highlighting and intellisense to work.
- 2OEH8eoCRo0 4y ago> modern Dev environments are ridiculous Yes they are. But why can my crappy work laptop with an i7-1185 do it then?
- scruple 4y ago> modern Dev environments are ridiculous VsCode + Docker on Mac + devcontainers (at my last job) make for an atrocious development experience. It was a major contributing factor when I left that job.
- crazygringo 4y agoAnd probably a badly behaving extension in VSCode that won't stop indexing or regexing or something. Because this sounds like constant 100% CPU usage on at least one core.
- mrtksn 4y agoRight, in this particular case it looks like a VSCode extension gonna wild since the battery dropped in constant pace which is an indication of constant load and the system reports VSCode dominance in energy use.
- jscheel 4y agoI mean, vscode's own extensions and language servers crap the bed plenty, though it's gotten much better in the last year or so.