Skip to content

search: match repos concurrently

Administrator requested to merge sh/search-repos-concurrently into main

Created by: stefanhengl

This PR adds concurrency to repo matching. According to tracing data, repo search is a bottleneck for global queries. In a local benchmark, the implementation showed a speed-up of 4x. We have to see how this translates to performance gains on Cloud.

For global queries, for which we don't have to care about revisions, we might offload the repo matching to Zoekt, but this will be tackled in a different PR.

I also implemented a variant of this PR that uses channels instead of mutexes. I was wondering whether the diminishing gains in performance (>5 workers) were due to goroutines busy-waiting on mutexes. However, the alternative turned out to perform significantly worse.

Merge request reports

Loading