Skip to content

gpui: Throttle framerate to 30 for unfocused windows#52970

Merged
Veykril merged 1 commit intomainfrom
veykril/push-otryuyktsorn
Apr 9, 2026
Merged

gpui: Throttle framerate to 30 for unfocused windows#52970
Veykril merged 1 commit intomainfrom
veykril/push-otryuyktsorn

Conversation

@Veykril
Copy link
Copy Markdown
Member

@Veykril Veykril commented Apr 2, 2026

This should reduce energy consumption when having agents running in background windows, as the spinner that is being animated won't refresh at the display framerate anymore.

Release Notes:

  • Reduced energy consumption for background windows by throttling their update speed
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 2, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Apr 2, 2026
@Veykril Veykril force-pushed the veykril/push-otryuyktsorn branch from ae4a0a9 to 8575b8e Compare April 9, 2026 11:14
@Veykril Veykril enabled auto-merge (squash) April 9, 2026 11:24
@Veykril Veykril merged commit 72eb842 into main Apr 9, 2026
32 checks passed
@Veykril Veykril deleted the veykril/push-otryuyktsorn branch April 9, 2026 11:28
@Anthony-Eid
Copy link
Copy Markdown
Contributor

Anthony-Eid commented Apr 10, 2026

I'm not sure this was the right solution for this problem. We should have each animate be behind an AnyView element so we only re render the animated element instead of it's parent (The full agent panel) each frame

Edit: I also feel like this is an API that should be configured by APP, because other applications that are gpui based may not want this behavior

@Veykril
Copy link
Copy Markdown
Member Author

Veykril commented Apr 10, 2026

I'm not sure this was the right solution for this problem. We should have each animate be behind an AnyView element so we only re render the animated element instead of it's parent (The full agent panel) each frame

We do not have damage tracking, so any change to the frame will cause us to redraw the entire frame. You are correct that we do not recompute the full scene graph, but thats not what this change is about.

maan2003 added a commit to maan2003/zed that referenced this pull request Apr 12, 2026
maan2003 added a commit to maan2003/zed that referenced this pull request Apr 13, 2026
piper-of-dawn pushed a commit to piper-of-dawn/zed that referenced this pull request Apr 25, 2026
…52970)

This should reduce energy consumption when having agents running in
background windows, as the spinner that is being animated won't refresh
at the display framerate anymore.

Release Notes:

- N/A or Added/Fixed/Improved ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

3 participants