zed icon indicating copy to clipboard operation
zed copied to clipboard

High battery usage

Open iishabakaev opened this issue 1 year ago • 9 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Same problem as https://github.com/zed-industries/zed/issues/4417 Zed is top battery consumer in my mac m1 pro

image

For comparison vs code consume almost nothing image

Details image image

Environment

Zed 0.162.5 MacOS 15.0.1 Chip Apple M1 Pro RAM 16 GB

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

iishabakaev avatar Nov 24 '24 19:11 iishabakaev

same, Zed 0.163.2, MacBook Air M3 15.1.1 (24B91)

ichord avatar Nov 29 '24 06:11 ichord

Same here, Zed 0.162.5, Apple MacBook Pro M2 14-inch, 2023

alejodelosrios avatar Dec 04 '24 00:12 alejodelosrios

another one! I just started a new job, and wanted to try out Zed with my new mbp 14in Nov 2024, MBP M4 Max 64gb, Zed v0.172.8

a near stock Zed setup and I write mostly Elm all day but I see it wanting to download something about Typescript intellisense but never completes. I really want to like Zed.

m0n01d avatar Feb 06 '25 14:02 m0n01d

Same here, Zed 0.172.10, M4 Pro.

Has anyone been able to solve this problem? Not even Xcode consumes that much.

02/08/25: Update: It looks like restarting my Mac restored the power consumption to normal.

03/28/25: Update: It seems this occurs when you're using Assistant Chat, but running it normally doesn't consume as much energy. However, as soon as you ask a question in the chat, the energy usage starts to increase

andorep avatar Feb 08 '25 23:02 andorep

Zed is almost 100% the top consuming energy app on my macOS (M2 Max chip).

ebressert avatar Mar 26 '25 19:03 ebressert

Image

+1 energy usage is crazy high. It killed my MacBook Pro m4 battery in 1 hour, with sublime I was able to work for hours...

riccardodivirgilio avatar Mar 27 '25 16:03 riccardodivirgilio

I found that updating Zed and then restarting the laptop fixed the issue.

ebressert avatar Apr 04 '25 01:04 ebressert

I found that updating Zed and then restarting the laptop fixed the issue.

It does work but is momentarily. I try that multiple times 😔

andorep avatar Apr 04 '25 01:04 andorep

I've been experiencing this as well. Whenever I've inspected the usage I've seen python processes with very high energy impact and they've been python-lsp processes. Unfortunately there's no 12hr aggregation on subprocesses so I can't say for sure that's always the culprit. I've switched to pyright for now as it seems to be gentler on the battery.

Image

hlawrenz avatar May 13 '25 17:05 hlawrenz

Same here in a Go project

d3ce1t avatar Jun 07 '25 21:06 d3ce1t

Same here for an Elixir project

Running an M2 Pro for work and an M3 Pro for personal – both are affected

Image

AydanGaite avatar Jul 03 '25 02:07 AydanGaite

Mac M4 Pro, Ruby/Typescript projects, both affected

Image

Spence1115 avatar Jul 09 '25 08:07 Spence1115

Same here, Zed 0.172.10, M4 Pro.

Has anyone been able to solve this problem? Not even Xcode consumes that much.

02/08/25: Update: It looks like restarting my Mac restored the power consumption to normal.

03/28/25: Update: It seems this occurs when you're using Assistant Chat, but running it normally doesn't consume as much energy. However, as soon as you ask a question in the chat, the energy usage starts to increase

Looks like a fix for high memory consumption from the agent panel was released https://github.com/zed-industries/zed/pull/35764.

If anyone is still experiencing issues with Zed, I'd recommend updating to the latest version.

andorep avatar Aug 12 '25 23:08 andorep

I was working on a simple python script.

Idling is fine with Zed, not energy impact.

But when i start editing code the energy impact increases.

I tried to generate a python script using copilot in zed and during the text is streamed the energy impact was raised up to 2000.

Did the same operation with vscode and the energy impact on vscode was just below 100.

It feels like Zed use more energy than vscode for similar tasks because of Zed's high GPU usage. It could be because the Apple M1 GPUs are not energy efficient.

I run on Apple M1 Pro with latest MacOS version 15.6

gayanper avatar Aug 17 '25 17:08 gayanper

same to me Zed 0.207.4 4fa537cf6bcdbf3fca6da318a266d72444b5001b mac m1

rambocode avatar Oct 12 '25 12:10 rambocode

Same issue here. MacBook Air M3.

QuentinDEME97 avatar Oct 12 '25 16:10 QuentinDEME97

I have this same issue trying to use Zed on a MacBook Pro 14" M1 Pro, base model. I do primarily C and Lua dev utilizing the clangd and Lua LSP plugins.

I switched from VSCodium, where I use a somewhat similar setup with clangd, and have found that I more frequently have to charge my laptop throughout the day. About an hour of editing might drop the battery 40% or more. The laptop also gets noticeably warm, which is something not a lot of applications are able to do.

It seems as though when typing full tilt or scrolling a lot through larger text files, GPU usage will jump to around 50%.

Unfortunately I will have to switch back to VSCodium to preserve my battery life.

EDIT: Tried on latest stable: Zed 0.207.4 4fa537cf6bcdbf3fca6da318a266d72444b5001b

And on latest preview: Zed Preview 0.208.4 f4b75a82e0a195ac80a63d99659376fd79d3d319

The result is consistent on both versions.

suicvne avatar Oct 15 '25 13:10 suicvne

Two Zed instances left open for a couple hours on a 600-line project and its branch :/ . I'm going back to codex-cli.

Image

vladiliescu avatar Oct 17 '25 17:10 vladiliescu

Same here. Zed is the first editor I've used in years that I've been excited about but I'm debating moving away because of how much it eats battery.

dougc84 avatar Oct 19 '25 22:10 dougc84

also seeing this, the battery drain is kind of crazy

Image

daviddai-evenup avatar Oct 22 '25 23:10 daviddai-evenup

Same thing for me:

Macbook pro M4 Zed 0.208.5 161d1d1f0feecdc462f1a7c63c2f42ba77a7e4f0

Image

This seems to be an old issue and nobody form Zed team seems to care about this.

I will be uninstalling Zed until this is fixed

alveshelio avatar Oct 23 '25 22:10 alveshelio

The problem is still relevant on mac m3. Using this editor kills the battery. Unfortunately, I will have to stop using it. Although I really like the editor.

coolswood avatar Oct 27 '25 08:10 coolswood

Same issue on M4 Air

Here are some logs that might be related:

2025-10-28T11:28:12+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:28:12+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:28:24+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:28:24+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:28:24+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:28:39+05:30 WARN [project::lsp_store] Get completion via vtsls failed: Request textDocument/completion failed with message: Reduce of empty array with no initial value 2025-10-28T11:28:40+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:28:40+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:28:40+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:29:03+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:03+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:03+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:29:22+05:30 WARN [project::lsp_store] Get completion via vtsls failed: Request textDocument/completion failed with message: Reduce of empty array with no initial value 2025-10-28T11:29:28+05:30 WARN [project::lsp_store] Get completion via vtsls failed: Request textDocument/completion failed with message: Reduce of empty array with no initial value 2025-10-28T11:29:36+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:36+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:36+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:29:44+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:44+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:44+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:29:50+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:50+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:50+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:29:57+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:57+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:29:57+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:30:12+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:30:12+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:30:12+05:30 INFO [project.lsp_format] Formatting via LSP 2025-10-28T11:30:14+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:30:14+05:30 WARN [project.format.local.code-actions] No code actions were resolved, continuing 2025-10-28T11:30:14+05:30 INFO [project.lsp_format] Formatting via LSP

pranjalmaurya01 avatar Oct 28 '25 06:10 pranjalmaurya01

I'm still seeing zed be super battery-hungry:

Image

Did anyone find a fix for this?

benswift avatar Nov 26 '25 09:11 benswift