Repository navigation
perf(pty): make delivery pressure tracking constant time - #10113
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughPTY renderer-delivery pressure accounting now maintains pending character totals and peak counters incrementally through dedicated mutation helpers. Lifecycle, flush, exit, hidden-delivery, and interactive paths use these helpers, while ACK and renderer state handlers no longer recompute pressure by scanning delivery maps. A regression test covers 1,000 ACKs across 100 tracked PTYs and verifies only the targeted PTY’s counters change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
nwparker
force-pushed
the
nwparker/perf-pty-delivery-diagnostics
branch
from
July 23, 2026 06:34
79fd4be to
9776f0b
Compare
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
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.
Description
send, instead of rescanning every tracked terminal.
oracle.
ELI5
Orca used to recount every package in two warehouses whenever any terminal acknowledged one delivery.
Now it updates one ledger line for the terminal that changed. It still performs a full inventory when
someone explicitly asks for diagnostics or resets the counters.
Proof of zero regression
git diff --checkpassed.data.lengthdeltas. Partial drainkeeps its delete-then-set ordering and fairness. ACK/resync/heal, dropped-output sentinels,
transformed
rawLength, producer flow control, exit final flush, lifecycle/reset, and destroyedwindow cleanup retain their existing behavior.
separate path and is unchanged.
observed on the pre-rebase base were audited: the transcript watcher passed 28/28 alone, and the
worktree-removal assertion failed identically on clean
origin/main.failing assertion passed locally and GitHub
verifypassed in full. Windows terminal restart andpackaged crash-survival checks also pass.
pnpm run lintreaches the same unrelated releasedorca-clirevision-9 manifest blocker afterall lint, reliability, max-lines, and bundled-guide stages pass. This diff changes no skill files.
Proof of performance improvement
entries.
exactly 200,000 map-entry visits.
Map.values()calls and therefore zerodiagnostic map-entry visits.
touched PTY. Full scans remain only when a debug snapshot is explicitly read or reset.