Skip to content

zoekt: binary encoder for repo branches

Administrator requested to merge k/zoekt-update into master

Created by: keegancsmith

This updates zoekt to include a custom binary marshaller for repo branches. When CPU profiling two of the major contributors is Gob encoding and garbage collection. This should significantly improve time spent gob encoding (~4x faster). It also will only allocate one large buffer vs 2 per key, value in gob. This should help reduce pressure on frontend.

For example on Sourcegraph.com we have 100k repos indexed with 12 search replicas. This means when marshalling the repobranches for default we will go from allocating 100k * 2 * 12 = 2.4 million objects to 12.

This commit requires zoekt and sourcegraph-frontend to have the same version of query.RepoBranches. For customers this will require a small amount of downtime when upgrading. For sourcegraph.com I will ensure they roll out at the same time.

Changes:

Merge request reports

Loading