zoekt icon indicating copy to clipboard operation
zoekt copied to clipboard

Diff zoekt git settings

Open xvandish opened this issue 2 years ago • 3 comments

This is an optimization on top of what I introduced in #600.

Rather than always updating the zoekt settings for every repo, which can be at least 10 git calls per repo (10 is the current number of zoekt settings we store), we instead get all zoekt-* settings with one call, and then only make calls to update the changed values. I remember testing, and the code handled new and deleted zoekt-* keys fine. This is just a constant speedup, but it really limits the number of git calls and IO we perform, especially with larger sets of repos.

We also make another change, in that if the zoekt-settings are updated, we return the repoDest which triggers a re-index right away.

xvandish avatar Aug 02 '23 18:08 xvandish

this code looks a little tricky. Maybe you want to take this opportunity to switch to using go-git to do this? Look at the implementation of setFetch to see how you could do this.

Sure, I'll give it a shot! thanks for taking a look

xvandish avatar Aug 03 '23 20:08 xvandish