Description
Replace the manual filesystem walk and regex search in source/utils/file-search.ts with a bundled rg (ripgrep) binary to drastically improve file search speeds.
Use Case
On large repositories, the current JS-based file search (lstat, readdir, per-line regex) is 10–50x slower than ripgrep. search_file_contents is one of the most frequently called tools, so this causes noticeable lag.
Proposed Solution
Vendor a ripgrep binary (similar to how VS Code does it) and shell out to it for search_file_contents.
Alternatives Considered
Offloading the JS walk to a worker thread (Tier 2 improvement, but still much slower than ripgrep).
Additional Context
Implementation Notes
This is the biggest raw speed win for large codebases.
Description
Replace the manual filesystem walk and regex search in
source/utils/file-search.tswith a bundledrg(ripgrep) binary to drastically improve file search speeds.Use Case
On large repositories, the current JS-based file search (
lstat,readdir, per-line regex) is 10–50x slower than ripgrep.search_file_contentsis one of the most frequently called tools, so this causes noticeable lag.Proposed Solution
Vendor a ripgrep binary (similar to how VS Code does it) and shell out to it for
search_file_contents.Alternatives Considered
Offloading the JS walk to a worker thread (Tier 2 improvement, but still much slower than ripgrep).
Additional Context
Implementation Notes
This is the biggest raw speed win for large codebases.