perf: reduce idle GUI and daemon CPU - #168
Merged
Merged
Conversation
Batch repaint-only terminal activity at an app-wide presentation cadence and defer inactive-window paints while keeping parsing, notifications, focus reporting, and OSC clipboard handling immediate.
Keep visible and remotely subscribed projects responsive while moving hidden repositories to bounded fallback cadences. Preserve cached statuses across targeted polls and anchor periodic work to wall-clock deadlines.
Do not infer visibility from key-window activation, because a visible window on another monitor is normally non-key. Keep every pane and sidebar on the shared capped repaint cadence while focus reporting remains scoped to the actual key window.
neumie
marked this pull request as ready for review
July 28, 2026 13:49
Use a leading-edge repaint for the first output after idle, then coalesce sustained activity into 20 ms frames. This keeps typed echo responsive while bounding high-frequency terminal presentation across all windows.
Track a causal output epoch for each input so parsed post-input output bypasses an active 20 ms presentation batch. Keep unrelated terminal activity queued, expire unanswered requests, and cover backlog and enqueue races.
Trace input through the daemon, PTY, repaint throttle, and GPUI frame boundaries. Keep the instrumentation behind a Cargo feature and require an explicit runtime opt-in.
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.
Summary
Changes
GUI activity rendering
Daemon Git polling
Measurements
Test plan
cargo test --workspacecargo test -p okena-terminal input_repaintcargo test -p okena-ui activity_repaintcargo test -p okena-app -p okena-views-terminalcargo build --releasecargo fmt --all -- --checkproc_pid_rusage