Conversation
Both the Overview and the tray window were created with backgroundThrottling: false, so a hidden or occluded window kept animating at full frame rate. Measured on the installed 0.1.1 build: the GPU helper sat at 50-80% of a core and the never-shown tray renderer at ~5% around the clock, unchanged by hiding the app or moving it to another Space. Chromium's default throttling only slows renderer timers and pauses rAF and CSS animations while the window is not visible. Nothing durable lives in the renderer: logs, job history and routing are in the main process and the Go services, IPC pushes still arrive, and the one rAF-batched store (workloads) flushes on the first frame after the window is shown. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Can GULDOGAN <cguldogan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Both the Overview window and the tray window are created with
backgroundThrottling: falsein the sharedwebPreferences(desktop/src/electron/window.ts). With it off, a hidden or occluded window keeps animating at full frame rate, so the app burns CPU/GPU around the clock even when nobody is looking at it.Measured on the 0.1.1 macOS build (Apple M1 Pro) with one job running and the window hidden or on another Space: the GPU helper process sat at 52–80 % of a core and the Overview renderer at 20–25 %, unchanged by hiding the app. The never-shown tray window held its own vsync callback and burned ~5 % permanently. macOS lists PAIR as a significant energy user as a result.
This PR removes the flag so Chromium's default throttling applies. Default throttling only slows renderer timers and pauses
requestAnimationFrameand CSS animations while the window is not visible. Nothing durable lives in the renderer: logs, the job history and routing are in the main process and the Go services, IPC pushes still reach a throttled renderer, and the one rAF-batched store (workloads.store) flushes on the first frame after the window is shown.Scope
desktop/src/electron/window.ts: removebackgroundThrottling: false(and the stale commented-out copy of it) from the sharedwebPreferences, with a comment recording why.Validation
Dev build (
npm start) from this branch on macOS 26, one inference job running through the proxy, sampled withtop -l 4 -s 3:Tray popover behaviour, which is the one place throttling could show:
npm run typecheckpasses.Risk
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.json, and described user-visible changes above so they reach the release notes. (Desktop-only change; no service component affected.)🤖 Generated with Claude Code