Repository navigation
perf: cut per-frame copies and idle polling in the frame pipeline - #23
Merged
Merged
Conversation
marcrdgz
force-pushed
the
perf/frame-pipeline
branch
from
October 19, 2026 20:27
f75c9be to
c7805af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance items 2.3–2.6 of the 0.8.0 plan: fewer per-frame copies in the daemon and client, cheaper link detection, and a quieter idle loop.
Changes
detach_buffer, which cloned the whole grid every frame, is gone.Arc<DaemonEvent>, instead of being deep-cloned per client.WireCell.textis nowCompactString(re-exported fromkumo-protocol). Short text is stored inline, so cells no longer each cost a heap allocation.Terminal::row_may_have_hyperlink).://.Grid::applymoves frame rows into the grid instead of cloning them.Grid::dirty_rows.ConfigFingerprint::refresh()re-reads a config file only when its size or modification time changed. Files modified in the last 3 s are always re-read, so a same-length rewrite on a filesystem with coarse timestamps is still caught.daemon_is_command_drivenso it ignores aConfigReloadedevent. That event can fire when concurrent tests change the config env, and the failure was intermittent.Wire protocol
Byte-identical, with a test comparing against the old
Stringcell layout. The only change is in the Rust API:WireCell.textis aCompactString, so construct it with"x".into().Benchmarks
Release builds, A/B against the pre-change base, 3 interleaved rounds on a loaded machine. The new benchmark is
benchmark_pane_frame_pipeline_120x40.Risks
Test plan
cargo build --workspace && cargo test --workspace && cargo clippy --workspace(run twice)vim/htop,seq 1 100000, resizes and splits while output is scrolling, two viewers on one session, wide characters/emoji, OSC 8 and plain URLs with the link modifier held, selection, config hot reload,kumo session listlatency, idle CPU