Skip to content

Completely resolve indexed search performance regression in v3.2.0

Warren Gifford requested to merge sg/complete-search-perf-fix into master

Created by: slimsag

In #3685 I resolved a major indexed search performance regression that was introduced in v3.2.0.

For a search returning 100 repositories and 100 results per repository:

  1. After the regression: we would do 100*100 == 10,000 Git OID resolutions (which would overload Gitserver and cause searches to timeout)

  2. After my previous resolution, we would no longer do duplicate work and thus only did 100 Git OID resolutions (1 per repository).

    • This was shown in benchmarks and load tests on customer instances to be a substantial improvement.
    • On one customer instance, we've found this still hasn't been enough of an improvement.
    • On another customer instance, we've found we could be doing better.
  3. After this resolution, we are 100% at the performance level we were at prior to v3.2.0 because we are no longer doing any additional Git OID resolutions. Zoekt already has this information and we already acquire this information prior to executing searches, we just weren't correctly reusing this information. Just goes to show that doing things the right way the first time around is incredibly important.

Test plan: Both manual testing and automated testing from existing search Go tests.

Merge request reports

Loading