Repository navigation
Defer file sorting for unlimited sharded searches - #1110
Merged
keegancsmith merged 2 commits intoAug 7, 2026
Merged
Conversation
keegancsmith
approved these changes
Aug 7, 2026
keegancsmith
left a comment
Member
There was a problem hiding this comment.
Nice catch! Did some extra validation and LGTM!
1 task done
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
Accumulate matched files across result chunks for searches without a display limit, then sort and truncate the aggregate once collection finishes. Display-limited searches intentionally retain the existing per-chunk sort-and-truncate behavior so their intermediate result size remains bounded.
Performance
On workload
end-to-end sharded search: 128 repositories × 64 interleaved file matches, no display limit, median metricns/opchanged from 223830837 to 8627535.5; paired median delta 215135473 (at least 19/20 confidence interval 208254612–223253064 from 10 pairs).On workload
end-to-end sharded search: 128 repositories × 64 interleaved file matches, no display limit, median metricallocs/opchanged from 562 to 366; paired median delta 195 (at least 19/20 confidence interval 194–198 from 10 pairs).Testing
Ran the search package tests and built all command packages.
All 2 declared correctness checks passed.
Authored and verified by Perfloop: every claim above was co-measured on both trees and independently re-verified before submission — the full record is public: case_3tyhw53hc7. Replies from this account are human-approved, and a human operator is accountable for this contribution.