fix(desktop): boot the main window unthrottled so cold start paints at full speed #7460
main fromrefs/pull/7460/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubThe 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.
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).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 12.6 KiB 12.6 KiB +2 B (+0.0%) 15.1 KiB ✅ Codex Thread snapshot wire 6.3 KiB 6.3 KiB −6 B (−0.1%) 7.3 KiB ✅ Codex Live turn WebSocket wire 6.3 KiB 6.3 KiB +8 B (+0.1%) 7.8 KiB ✅ Codex Live turn WebSocket decoded 51.8 KiB 51.8 KiB 0 B (0.0%) 66.4 KiB ✅ Codex Live turn messages 16 16 0 (0.0%) 21 ✅ Claude Total thread wire 12.6 KiB 12.6 KiB −5 B (−0.0%) 15.1 KiB ✅ Claude Thread snapshot wire 6.3 KiB 6.3 KiB −6 B (−0.1%) 7.3 KiB ✅ Claude Live turn WebSocket wire 6.3 KiB 6.3 KiB +1 B (+0.0%) 7.8 KiB ✅ Claude Live turn WebSocket decoded 52.7 KiB 52.7 KiB 0 B (0.0%) 66.4 KiB ✅ Claude Live turn messages 16 16 0 (0.0%) 21 ✅ Baseline:
fe281c5· PR result:f64bbd5· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 99.9 KiB
- Claude decoded thread snapshot: 100.6 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
f64bbd5Macroscope's review found this PR approvable — This is a self-contained performance optimization for cold start that disables Chromium background throttling during hidden boot phase and re-enables it on first reveal. The change is small, well-documented with comments, includes tests, and has clear intent with limited scope.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
36ea205d-749b-4f89-96d7-2828bd6f2192You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share