pub fn index_budgeted(
store: &mut Store,
root: &Path,
active: &[String],
budget: Duration,
query: Option<&str>,
) -> Result<Stats, Box<dyn Error>>Expand description
Opportunistic, time-bounded indexing — warm the index a little per call so no
single query blocks on a full walk of a large repo. active (branch) files
are parsed first and ignore the budget (the working set stays fresh); then the
walk streams the rest, honoring budget. When query is set, files whose
path matches it are parsed first (a cheap, in-memory reorder of the
candidate list — no file reads), so a relevant symbol indexes fast. A sweep
that finishes within budget marks coverage complete, else warming.