Repository navigation
perf: suspend parked New Tab and Settings renderers - #26975
Conversation
|
Bead |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 8b01895; does not block |
|
Review (subagent, correctness first): SHIP at 6b1b108 |
Real-app capture: parked pages wake cleanly (before
|
|
Orphaned: no activity for 13 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6-astra high, next-review): SHIP at 2a798a6 No blocking findings. |
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40974281406 at 12b4dc0 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Shipped in:
|
… kept (review: trunk #26975 lost) Trunk 12b4dc0 suspended the parked spare's renderer after its warm frame; the merge deleted NewTabSparePool (perf's preload slot replaced it) and the slot hides the page only with newTabParksHidden, which is off in every build. Ported onto AgentPanePreloadPage: without parksHidden the page view hides once its remembered frame was taken, wakes for a capture of the app's New Tab frame (a late chats.page answer) and sleeps again after it; the claim shows it and drops the callback, so a late capture cannot hide an adopted page. Trunk's capture seams (nextFrameOverride, snapshotOverride, newTabFrameCaptureChanged) are used again. Test: NewTabPreloadTests.theNewTabPageParksRenderingUnlessItParksHidden now asserts the sleep, the wake for a New Tab frame capture, the sleep after it, and no hide after the claim (red without this change: the page view never hides).
























![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Home creates unused WebKit warmups even when those pages use Chromium, and starts warm New Tab and Settings pages whose parking views have zero opacity. Warmup now checks the selected engine before allocating WebKit pages, using the latest claim options for both build and recycling. The spares now hide after their first paint (and the New Tab cover snapshot) and wake synchronously when adopted. Pending snapshot callbacks check ownership and generation before hiding anything.
Leo's request: "when it comes to the left scroll rail thing, i already said we want it ultra fast ultra responsive, but the same goes for EVERYTHING IN THE WEB UI" and "how could rendering be this fucking slow? ... There's just loads of bullshit in my sidebar that I'm not even looking at ... This is an M5 Pro ... get shit done."
No new timers or animation loops. A parked view owns a capture lifecycle callback: it wakes for a replacement cover after a late chat-list answer, then sleeps after that capture; adoption and drop clear it, and weak ownership checks reject stale calls. Paint/snapshot callbacks run once; a claim, reparent, replacement capture, dropped spare or pool release prevents a stale callback from hiding an active page. Existing transport pacing holds nonurgent pushes while hidden. Risk: a warm page's first reveal or cover image could regress, so native opening latency and captures were measured before landing.
Validation
python3 scripts/cmux-next/prepush-gate.pypassed; app-size warnings only.6b1b108043c(cmux-ci compile-check --app, job6b53ddf99dca).NewTabSpareVisibilityTests.aParkedSpareWakesForItsReplacementCoverAndSleepsAgain(step65824ea1a4f1). The old-code pool check fails its intended assertions at:27and:42(step5c93507911af); the old-pool New Tab check fails the hidden-replacement assertion at:78(stepf02ee807f509).6b1b108043c.c83f3215 + perf-10x-idle.shagainst that same baseline plus the3a7653b0..6b1b1080patch; feat-cmux-next had no published cmux-tui tree afterc83f3215.Performance
perf-10x-idle.shdebug.new_tabmatched A/BCMUX_PAGE_CLAIM_BENCH=8matched A/BThe Settings p50 increase is a flagged tradeoff: a small claim-path increase was observed; whether suspension causes it remains unsettled, while p90 improves and the much larger renderer and memory reduction applies at idle. The sample is eight claims, so this is recorded for follow-up rather than treated as a settled regression. New Tab visible p50 did not show a significant regression (p=0.17), p90 improved, and every run painted in one frame.
Changelog
Changed: Unused WebKit warmups are skipped; warm New Tab and Settings pages stop drawing while parked out of sight.
Before / after
Real-app first-frame and 1-second captures compare
3a7653b0with6b1b1080in light and dark: New Tab at launch, New Tab after 60 seconds idle, and Settings after 60 seconds idle. No blank, stale, or wrong cover was observed. New Tab used its parked spare (spare:true) at 37.7 ms after launch and 41.4 ms after idle; these individual observations are separate from the A/B distribution above.After: tour-new-tab
Capture
tour-new-tabat6b1b108043c9(fleet build, capture mini, text checked for private data)After: scene-settings
Capture
scene-settingsat6b1b108043c9(fleet build, capture mini, text checked for private data)Before: tour-new-tab
Capture
tour-new-tabat3a7653b054ed(fleet build, capture mini, text checked for private data)Before: scene-settings
Capture
scene-settingsat3a7653b054ed(fleet build, capture mini, text checked for private data)Agent session: agent session