perf: reuse row-build buffers and scan auto-approve prompts once per feed - #71
Merged
Conversation
…feed - render: keep per-row instance capacity on a full pane rebuild (resize_with instead of fresh Vecs) and thread a RowBuildScratch (segment cells, RunPool of ShapeRuns, highlight buffer) through rebuild_row_instances so dirty rows stop reallocating per row/run. - auto-approve: detect_and_update_any_agent runs find_prompt at most once per feed, sharing the observed MatchedPrompt between the decision and the state update; two-match rule and cooldown rescans are unchanged. Tests: full_rebuild_keeps_per_row_buffer_capacity, run_pool_reuse_matches_fresh_segmentation, detect_and_update_scans_viewport_once_per_feed. Claude-Session: https://claude.ai/code/session_01GBe292wmocEXM8SjBzjGq7
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merged
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
update_pane_cacheusedvec![Vec::new(); rows]on every full invalidation (selection/theme/search change), dropping all row buffers. Nowresize_with, so same-size rebuilds refill the existing slots.RowBuildScratch(segment cells,RunPoolofShapeRuns incl. their inner Vecs, highlight buffer) lives onRendererand is threaded throughrebuild_row_instances, replacing per-row/per-run allocations.segment_rowstays as the allocating wrapper for overlays/tests.detect_and_update_any_agentpreviously calledfind_prompt(lowercases every row) in both the decision and the state update. The observedMatchedPromptis now shared. Two-match rule and input-cooldown rescans unchanged.detect_any_agentremoved (no remaining callers).Tests
full_rebuild_keeps_per_row_buffer_capacity(capacity + allocation pointer unchanged, output identical)run_pool_reuse_matches_fresh_segmentationdetect_and_update_scans_viewport_once_per_feed(Hold / Fire / Suppressed each scan once)cargo test --workspacegreen (noa-ipc failures are the known sandbox loopback-bind issue, untouched); clippy/fmt clean for touched files.No benchmark numbers yet — the change removes allocations structurally; measure with
bench/run_all.shif wanted.https://claude.ai/code/session_01GBe292wmocEXM8SjBzjGq7