Repository navigation
perf(core): parallelize binary checks with content indexing off - #993
dkovalenko-oai wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
When content indexing is off, check files for binary content on up to two background workers before publishing the file index. Each worker uses the scanned file size as its read limit and skips files already marked binary. The scan uses the new index for classification, so a full rescan catches same-size rewrites even when the modification time matches.
Apple silicon macOS, warm filesystem cache, 24,576 files in a linked Git worktree, and the
ripgrepwalker. Medians from eight interleaved process runs per build. Startup and rescan timings include binary classification and Git status.b3b8ced)0dcff51)Startup medians were lower, with enough host variation that the paired intervals still include zero. The no-hit query took longer on this host, with similar process CPU time. #987 skips unchanged text on rescan. This PR checks every eligible file on rescan to give regular file results a fresh verdict.
Filesystem watcher
Same fixture with real macOS FSEvents and watching on. Medians from six interleaved runs per build. The file edit changes a text file's binary flag. The ignore file change excludes one tracked file, and the full rescan measurement includes binary classification and Git status.
Every file edit stayed incremental. Edit latency was similar across builds. For the full rescan, this PR reduced elapsed time versus main while using more CPU. #987 was faster on this mostly unchanged tree.