Repository navigation
perf: avoid redundant client ANSI encoding work - #4552
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughPatch rendering now sorts row spans before checking for overlap and caches raw cell-style tuples during cell writes. When a patch has no changed rows and the cursor state is unchanged and absent or hidden, encoding returns no bytes. The client skips writing and flushing stdout when the encoded payload is empty. Tests cover overlap ordering, style output, and cursor-state cases. Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established; this change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Merges 9 upstream commits: native kitty graphics rendering replacing the custom graphics API (herdrdev#4561, breaking), navigator search term matching (herdrdev#4535), avoiding inferring codex idle from terminal output (herdrdev#4563), Windows input coverage reporting and clipboard test fixes (herdrdev#4566), qualified Win32/Kitty input path test defaults (herdrdev#4587), reduced redundant client ANSI encoding work (herdrdev#4552), reduced repeated scrollback page lookups (herdrdev#4553), tmux auto-attach guard docs (herdrdev#4592), and keeping copy mode active during projection updates (herdrdev#4281). refs upstream herdrdev/herdr@8d95e9bd
…ates Adopt the stable cursor-settling sequence, row-based scrollback reads and redundant ANSI work reduction. Keep fork cursor color live during a position hold and do not skip metadata-only output when an OSC 12 color change or OSC 112 reset remains pending. Upstream sources: 856b64b, d59d060, 21fd121, 8d64c34, afd9e19. Refs herdrdev#4389, herdrdev#4404, herdrdev#4554, herdrdev#4553, herdrdev#4552, herdrdev#4303, herdrdev#4506, herdrdev#4546 Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
Summary
Reduce client ANSI encoding work without changing frame cadence or the wire protocol:
Measurements
Windows, Ryzen 7 9800X3D, 16 logical CPUs, optimized builds; medians of three paired runs in alternating order (30 samples per run after five warmups). Baseline 9903007; the subsequent master update only changes live-handoff test synchronization.
These are component elapsed times, not whole-process CPU savings. Single-cell spinner encoding did not improve (0.36 → 0.60 µs in the wide case). A separate five-run same-process stress test with a different style on every cell was ~7% slower (991 → 1,061 µs); repeated styles improved from 948 → 21 µs.
Visible-update replay captures were byte-identical in all six baseline/candidate runs. The large speedups reduce client work; they do not establish lower Ghostty/WindowServer CPU. Herdr already emits changed cell regions. The macOS CPU incident in #4546 has not been reproduced here, and this PR does not classify spinners or delay small updates.
Validation
Delivery validation on e676547:
just checkpassed (3,236 Rust tests; maintenance, architecture, integration and documentation checks; Clippy, formatting and dev build). Review Suite fast: both reviewers reported no findings (rvw_ad6ca41c). All eight PR checks passed, including Linux/macOS/Windows CI and Windows ConPTY packaging. Greptile approved this exact head (5/5); CodeRabbit completed its review with no actionable comments. Its generic docstring-coverage warning does not identify a behavior or documentation defect; no unrelated docstring expansion was added.