Skip to content

fix(desktop): boot the main window unthrottled so cold start paints at full speed - #7460

Merged
t3dotgg merged 1 commit into
mainfrom
fix/unthrottled-main-window-boot
Aug 19, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
fix/unthrottled-main-window-boot

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

The desktop app boots its main window hidden (show: false until ready-to-show), and Chromium throttles hidden renderers: timers coalesce to 1s and requestAnimationFrame stops entirely. #7445 removed backgroundThrottling: false from the main window while fixing hidden preview rendering, which put every cold boot into that throttled state. Claude Desktop shipped the same class of fix last week and measured ~2x faster background starts.

The fix keeps both behaviors: the window is created with backgroundThrottling: false so boot runs at full speed while hidden, and the first-reveal trigger flips throttling back on. After the window has been shown once, hiding or minimizing it throttles normally, so the #7445 win stays intact.


Change made by Claude Fable 5 via Claude Code.


Note

Low Risk
Desktop startup performance tweak with a targeted re-enable on first show; limited to main window webPreferences and covered by new unit tests.

Overview
Fixes slow cold starts caused by Chromium throttling the main renderer while the window stays hidden until ready-to-show.

The main window is created with backgroundThrottling: false so timers and requestAnimationFrame run at full speed during hidden boot. On the first reveal (same path that maximizes and shows the window), the code calls setBackgroundThrottling(true) so afterward hidden or minimized windows throttle normally again—preserving the behavior from the earlier preview fix.

Tests expect webPreferences.backgroundThrottling to be false at creation and assert setBackgroundThrottling(true) runs once when ready-to-show fires.

Reviewed by Cursor Bugbot for commit f64bbd5. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Boot the main window with backgroundThrottling disabled to improve cold start paint speed

Sets webPreferences.backgroundThrottling: false when creating the hidden main BrowserWindow in DesktopWindow.ts so the renderer runs unthrottled during startup. On the first ready-to-show/did-finish-load event, setBackgroundThrottling(true) is called to restore normal hidden-window throttling. Behavioral Change: the main window now boots with throttling disabled by default rather than using Electron's default (enabled).

Macroscope summarized f64bbd5.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant