Repository navigation
improve: reduce hot-path linear scans and redundant I/O - #95697
Merged
Merged
Conversation
vincentkoc
marked this pull request as ready for review
June 22, 2026 07:54
vincentkoc
force-pushed
the
codex/perf-hot-paths
branch
2 times, most recently
from
June 22, 2026 08:36
60fc6ae to
8d3119d
Compare
vincentkoc
force-pushed
the
codex/perf-hot-paths
branch
from
June 22, 2026 09:03
7958128 to
8985aab
Compare
vincentkoc
force-pushed
the
codex/perf-hot-paths
branch
from
June 22, 2026 09:15
8985aab to
bec3231
Compare
vincentkoc
force-pushed
the
codex/perf-hot-paths
branch
from
June 23, 2026 01:54
3b7e8f5 to
53f6452
Compare
Member
Author
|
Merged via squash.
Thanks @vincentkoc! |
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.
What Problem This Solves
Several high-frequency paths repeatedly scanned arrays, moved worklists from the front, or re-read filesystem metadata. Those patterns made common workloads quadratic or multiplied I/O as transcript, stream, media, and memory data grew.
Why This Change Was Made
shift/unshiftindexOffor each fragmentThe changes keep ordering, validation, legacy behavior, and transport semantics intact. No speculative persistence/index format was added.
User Impact
Large markdown responses, parallel tool streams, long transcripts, image batches, and repeated memory sources do less redundant work. The expected result is lower CPU and filesystem overhead on these hot paths without changing output or security boundaries.
Evidence
oxfmt --checkandgit diff --checkpassed0.86263 msbaseline versus69 msafter the worklist change42 msbaseline versus22 msafter the tail scan27948310315passed all 50 jobs before the latest mainline-only rebase27948998212has 49 passing jobs; its only failure is three untouchedsrc/gateway/server.cron.test.tstests, reproduced on exactorigin/mainatf40071cc