Repository navigation
perf(chat): reduce speculative mounts during large transcript flings - #33543
teamleaderleo wants to merge 5 commits into
Conversation
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d60a77e16a11b66e2ecf Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d60a77e16a11b66e2ecf
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fc0fa4c5ed2467ab49a6
Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fc0fa4c5ed2467ab49a6
|
Same-worker A/B run 41613313474 completed at fa55874. The failure is the new reversal test, identically on baseline and candidate; it is not a slower candidate or an infrastructure failure.
Both reversal logs show the same eight uncovered samples. The intended middle-start test actually starts near the bottom: first position 243831 in a range ending at 248031. Assigning scrollTop without reader intent appears to let follow/measurement logic restore the bottom before sampling. Repeated bottom samples also include intentional 24 px tail room. This test needs correct reader-intent setup and the shared coverage oracle; its zero-blank assertion should remain strict. The range unit regression is red on baseline and green on candidate, and full web checks passed. However, this range reduction does not solve blanking and its ~4.5% interval improvement is too small to justify the unproven deceleration coverage tradeoff. I am withdrawing this candidate and keeping the existing predictive windows. Product work continues in #33579 (confirmation-only prompt renders) and a separate mounted-row height-read batching change. These numbers cannot be compared directly with older measurements on different workers. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Yours to fix: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by |
|
Withdrawing this candidate: same-worker A/B showed only 44 to 42 ms fling p95, unchanged 1 blank frame / 16 ms per fling, and a reversal fixture that does not establish safety. Evidence: #33543 (comment). Preserve the existing predictive range; product work continues in #33579, #33624 and #33629. |
A fast transcript fling currently mounts the capped directional band plus two predicted landing windows. This candidate omits that intervening band only when a single scroll step exceeds the four-viewport cap, while retaining one viewport on either side of the current view and both predicted windows. Moves of four viewports or less retain the existing contiguous lead.
HOLD: This PR's same-worker A/B validation, strict slowdown/reversal coverage, independent review, and webview verdict are outstanding. Do not land until those results establish that it helps without worsening blank frames.
Leo: "i feel like the app is slow on scrolling thru stuff... claude desktop is 120hz or something and ours is wack + it has sometimes not even rendered stuff!?"
The implementation and focused regression tests are complete; verification is pending. This ordinary PR enables the fleet test route. It makes no performance-improvement or native 120 Hz claim. Stacked on #33358; the harness is identical in both A/B variants.
Risk: a six-viewport step followed by a two-viewport slowdown can enter the omitted band before the next mount commit. The new browser regression checks abrupt slowdown and reversal in both directions with zero blank frames, in the middle of the transcript. Reject this candidate if coverage worsens. No App.tsx, first-paint, initial rail entrance, Swift, timers, warm-window quantization, or idle-decay changes.
Prior art: #19981 introduced the predicted windows and kept the capped band for uneven drags; this preserves both predictions and the existing 2–4 viewport drag path. #31320 warm-window quantization, #31760 idle lead decay, and #32837 indexed geometry remain intact. Design spec: leo-workspace design/chat-transcript.md; presentation is unchanged.
Validation completed: changed-file formatting, light web lint with type-aware checks deferred to fleet, prepush-gate (no new violations), git diff --check, and Python syntax. Browser tests, range tests, A/B timing and coverage have not run for this head.
Fleet command, after installing webviews dependencies and WebKit:
The runner records exact commits, host, per-command exit status, and logs; restores model.ts after each comparison; and keeps timing separate from coverage sampling. It changes only scrollLeadRanges between variants and uses the same regression tests and benchmark for both.
🤖 Generated with Codex
Agent session: agent session
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fast transcript flings currently mount the capped directional band plus two predicted landing windows. This candidate skips that intervening band only when a single scroll step exceeds the four-viewport cap, keeping one viewport on either side of the current view plus both predicted windows; moves of four viewports or less keep the existing contiguous lead. The change is held for same-worker A/B validation, slowdown/reversal coverage, and review, and makes no performance-improvement claim.
Verification
scripts/cmux-next/scroll-lead-ab.pyruns the existing benchmark and browser regressions against baseline and candidatemodel.ts, isolating onlyscrollLeadRangesand restoring the original source on exit.Written for commit fa55874. Summary will update on new commits.