]> git.cworth.org Git - notmuch/commit
CLI/git: cache git indices
authorDavid Bremner <david@tethera.net>
Tue, 19 Apr 2022 11:32:14 +0000 (08:32 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 17 Jun 2022 11:40:19 +0000 (08:40 -0300)
commit66ccf420c20bedec8dd78dc81ed1166761b7a467
treed05cd230d80e9ee384e30d7065b0c41b199d0a45
parent5ef56fe8126006351008c4016ea34d97c7cdcd9f
CLI/git: cache git indices

If the private index file matches a previously known revision of the
database, we can update the index incrementally using the recorded
lastmod counter. This is typically much faster than a full update,
although it could be slower in the case of large changes to the
database.

The "git-read-tree HEAD" is also a bottleneck, but unfortunately
sometimes is needed. Cache the index checksum and hash to reduce the
number of times the operation is run. The overall design is a
simplified version of the PrivateIndex class.
notmuch-git.py
test/T850-git.sh