Files
orca/src/main/ripgrep
Neil be4cea1584 perf(wsl): search Windows-drive projects with host ripgrep (#27690)
* perf(wsl): run ripgrep on the Windows host for drive-path projects

A project stored on a Windows drive (C:\...) with the WSL runtime selected
ran quick open, file-path search, content search and Markdown listing
through wsl.exe and the Linux rg reading /mnt/c over drvfs. rg only reads
files, so it has no git index whose stat cache two writers could thrash;
the host binary reads NTFS directly.

Measured on a 21.6k-file clone on C: (Windows 11, Ubuntu-24.04):
  content search  WSL rg 3.5 s  -> host rg.exe 0.19 s
  file listing    WSL rg 0.14 s + ~65 ms wsl.exe spawn -> host 0.03 s

Git routing is intentionally unchanged: alternating Windows git and WSL git
on the same index forced a full ~250 s rehash on the next WSL git status.

WSL UNC roots and non-drive roots keep their existing routing.

* fix(search): keep host rg results whole when files only WSL can open exist

Windows rg cannot open a 'nul' file, Win32-trimmed names, or WSL-created
symlinks; treat those per-file errors as skipped rather than failing or
truncating the search, and keep symlink-following scans in WSL.
2026-10-11 19:35:46 -07:00
..