Skip to content
Snippets Groups Projects

search: Improve performance of zoektIndexedRepos

Merged Warren Gifford requested to merge zoekt-indexed-repos-perf into main

Created by: efritz

During a hack hour, @keegancsmith and I found that 300ms of global search was being taken by determining which repositories are indexed. This change makes the common case faster and reduces allocations by 98% and wall time by 22% when no branches are specified.

$ benchstat old.txt new.txt
name                   old time/op    new time/op    delta
_zoektIndexedRepos-16     151ms ± 5%     118ms ±16%  -22.22%  (p=0.008 n=5+5)

name                   old alloc/op   new alloc/op   delta
_zoektIndexedRepos-16    33.6MB ± 0%    20.8MB ± 0%  -38.09%  (p=0.008 n=5+5)

name                   old allocs/op  new allocs/op  delta
_zoektIndexedRepos-16      407k ± 0%        7k ± 0%  -98.37%  (p=0.008 n=5+5)

Merge request reports

Merged by avatar (Apr 7, 2025 9:21pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading