Conversation
royalaid
force-pushed
the
fix/search-files-cpu-upstream
branch
from
August 29, 2026 20:43
ee3bdd6 to
2196b69
Compare
royalaid
marked this pull request as ready for review
August 30, 2026 08:02
This was referenced Sep 2, 2026
Contributor
|
Triage note (perf/P2 sweep) — scope check and composition.
Method: same machine (macOS arm64, Apple M3), each PR cherry-picked onto fresh origin/main 1cb3ab6, medians of ≥5 runs unless the metric is deterministic. Scripts live in my triage workspace ( |
Contributor
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
search_files(target="files")default to bounded discovery orderorder="modified"findfallback while keeping narrow, pruned fallback behaviorMotivation
When ripgrep is unavailable on inherited PATH, concurrent filename searches can fall through to full GNU
find | sortwalks. Multiple sessions or a single concurrent tool batch can sustain several CPU-heavy scans at once. Modification-time sorting also defeats bounded early output on broad roots.Behavior
order="modified"and requires ripgrep 14+ or GNUfind -printf@completion recency behavior is unchangedBounded zero-match probe
--hidden --no-ignorefor useful project-local ignored files, while adding both root and descendant--globexclusions from one shared scan policy covering VCS internals, dependency/vendor trees, virtualenvs, caches, generated/build output, and backup copiessearch_filesregression fixture confirms an ignorednode_modules/package/.hidden/dependency.jsis not traversed or reported while an ignored.project-local/settings.cfgremains reportednode_modules/root is also bounded; hidden descendants are not reported by the fallback diagnostic proberg.exescans and 47.6 seconds cumulative Defender scan duration on ignorednode_modules; no machine-specific local artifact is publishedVerification
148 passed, 2 skippedacross filename-search, fallback, macOS exclusion, concurrency, and interrupt suites on native Windows10 passedacross focusedSearchResult, path-validation, and real Git-Bash fallback classesdependency.jsappeared in the hidden-file warning19 passed; shared subdirectory-hint policy56 passed; filename-search CPU13 passed; engine selection43 passed; hidden directories10 passed; error guard10 passed; budget truncation19 passed; file-operation edge cases21 passedgit diff --check, and final commitgit diff HEAD^..HEAD --checkpassedscripts/run_tests.shwas attempted with one worker, but its per-file timeout expired under local host contention before tests completed; that run is not reported as greencc2c991de7places that file under a hidden descendant, preserving the node_modules-pruning assertion, and its native-Windows focused run passes19 passed33285716521passes the required-check gate, Python tests, Windows/macOS lanes, Python lints, Docker amd64/arm64 builds, nix, OSV, supply-chain, e2e, and repository gates; expected non-applicable jobs are skippedupstream/main@aff5125f8edf5095aef5d3d79bbbb101c95b9413file_tools.pyschema refactorNo new dependency is introduced. The focused fallback used the existing Hermes Python 3.11 runtime with pytest packages supplied from a temporary external test target; no test dependency was added to the repository.