perf(mcp): filter suffix globs while building search scope - #1836
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
Thank you for the measured Windows improvement and for preserving the existing complex-pattern and final-filter paths. The focused tests and before-and-after timing make the intended scope clear. The contribution queue is quite full, so review may take a little time, but we have the PR routed and will return with feedback as soon as possible. |
|
Approved. A 70% cut on a real Windows index is worth having, and the way you got it is the safe way. You reused the existing classifier rather than inventing a notion of "safe". The pre-filter is a pure optimisation, and that is the property that matters. It excludes exactly what the surviving post-filter would exclude, so a file cannot be dropped that the old path would have kept. Keeping the post-filter rather than trusting the new one to be complete is the right call. Your negative test is the one that earns confidence. One nicety, not a change request: the case folding is ASCII-only, which is correct here because One small ask: the benchmark would be more useful with its context recorded — machine, and roughly what "a large Windows index" was in files or size. "2.10s to 0.63s, median of three" is a good measurement; without the host it is hard to compare against later. Convention here is to note the machine alongside the numbers. Please rebase — this is currently |
Signed-off-by: Ertan <ertan.kucukoglu@gmail.com>
4367312 to
2f37f61
Compare
|
Merged as Before merging I verified the combined tree rather than this PR alone, because #1877 landed in the same batch and also touches |
Summary
Performance
Benchmark host: Windows 11 Pro, AMD Ryzen 9 7950X, 64 GB RAM.
Dataset: a mixed-language Windows index with roughly 184,000 indexed files; the
*.passearch selected about 460 files. Median elapsed time across three runs improved from 2.10s to 0.63s (about 70%).Tests
make -f Makefile.cbm test-focused TEST_SUITES=mcp CC=clang CXX=clang++ SANITIZE=Refs #1565