]> Sergey Matveev's repositories - public-inbox.git/commit
index: support --fast-noop / -F switch
authorEric Wong <e@80x24.org>
Thu, 24 Dec 2020 10:09:19 +0000 (10:09 +0000)
committerEric Wong <e@80x24.org>
Fri, 25 Dec 2020 08:56:50 +0000 (08:56 +0000)
commite8d6c34c749d1b0fd1dc1278cd4a2a310b31a9ac
tree8d763b9a908846bd5ab438d742f6e7f71162be5a
parentb3cf37096874c6c80ef554e5153e5d995c72ab95
index: support --fast-noop / -F switch

Note: I'm not sure if it's worth documenting and supporting this
long-term.

We can can avoid taking locks for invocations of "index --all"
and rely on high-resolution ctime (struct timespec st_ctim)
comparisons of msgmap.sqlite3 and the packed-refs + refs/heads
directory of the newest epoch.

This cuts public-inbox-index invocations with
"--all --no-update-extindex -L basic" down from 0.92s to 0.31s.
The change with "-L medium" or "-L full" and (default) non-zero
jobs is even more drastic, reducing a 12-13s no-op invocation
down to the same 0.31s
lib/PublicInbox/V2Writable.pm
script/public-inbox-index