rtk-ai / rtk-ai/rtk

recall: sqlite mode costs ~1.7x the disabled baseline; batch search.rs into one store per run

Open
#3,946 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:performance bug priority:medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.