Open ggilmore opened 2 years ago
Heads up @sourcegraph/search-core - the "team/search-core" label was applied to this issue.
Whats the status here?
The current status is that this hasn't been implemented yet - incremental builds still fetch all of the build objects.
James did some good work on this in https://github.com/sourcegraph/zoekt/pull/403, but we haven't revisited this since the red-accounts work. This work hasn't been prioritized at the moment.
Zoekt's incremental-indexing implementation works by only indexing the files that have changed since the most recently indexed commit.
It currently does this by (pseudocode):
There is a big opportunity to save time in this process by eliminating the
git fetch
step. Sincegitserver
already stores all of the necessary commit information, it seems duplicative to have to copy all of the commits over the network in order to perform a local analysis on the Zoekt instance.If gitserver was capable of directly providing
git diff
output via an API call, Zoekt could use that directly to reconstruct the changed files. Since thegit diff
output is a (much smaller) subset of all the commit information necessary to construct it, transmitting that directly can lead to huge time savings.