recall: sqlite mode costs ~1.7x the disabled baseline; batch search.rs into one store per run
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
sqlite recall mode costs roughly 1.7x the disabled baseline on a directory-wide grep, because search.rs stores once per file rather than once per run.
Measured on rtk grep -rn let src/cmds (hyperfine, 15 runs, release build of #3278 head ddc21826):
disabled 16.0 ms +- 0.3
tee 15.7 ms +- 0.4
sqlite 26.7 ms +- 0.8
tee mode is at parity with disabled; the gap is specific to sqlite. Batching the per-file stores into a single store per run is the fix the author identified.
Note this is a throughput figure on a whole-directory grep, not a startup measurement.
Agreed as a follow-up during review of #3278.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in search.rs and trace how sqlite recall mode stores results for each file during a directory-wide grep. Use the reported rtk grep -rn let src/cmds release benchmark as the baseline, comparing disabled, tee, and sqlite modes. Done means sqlite batches stores once per run and its throughput no longer has the reported gap against the disabled baseline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100