Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7460/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

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](https://cursor.com/bugbot) for commit f64bbd57fa3762f558948daae5255d077bc47aa5. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

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.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 36ea205d-749b-4f89-96d7-2828bd6f2192

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire12.6 KiB12.6 KiB+2 B (+0.0%)15.1 KiB✅
      CodexThread snapshot wire6.3 KiB6.3 KiB−6 B (−0.1%)7.3 KiB✅
      CodexLive turn WebSocket wire6.3 KiB6.3 KiB+8 B (+0.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded51.8 KiB51.8 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages16160 (0.0%)21✅
      ClaudeTotal thread wire12.6 KiB12.6 KiB−5 B (−0.0%)15.1 KiB✅
      ClaudeThread snapshot wire6.3 KiB6.3 KiB−6 B (−0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.3 KiB6.3 KiB+1 B (+0.0%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded52.7 KiB52.7 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages16160 (0.0%)21✅

      Baseline: fe281c5 · PR result: f64bbd5 · Source CI: success

      Scenario 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.

    4. Approvability

      Verdict: Approved at f64bbd5

      Macroscope'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).

Sign in to join this conversation.