Skip to content

Reduce number of zoekt RPCs for repohasfile: queries

Administrator requested to merge 4833-one-zoekt-query into master

Created by: ijt

Fixes #4833, reducing latency for queries with repohasfile:.

Before this change, the frontend was making one RPC to zoekt per repo to check if it had a file matching the repohasfile: pattern. After this change, the frontend makes a single RPC to find all the repos with files matching the pattern.

Test plan: reuse existing unit tests for repoShouldBeAdded by retrofitting.

The images here show a 7x speedup on this query running on a local instance with 60 repositories:

Before: Screen Shot 2019-08-13 at 7 40 56 PM

After: Screen Shot 2019-08-13 at 7 39 27 PM

Merge request reports

Loading