From e8d6c34c749d1b0fd1dc1278cd4a2a310b31a9ac Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Dec 2020 10:09:19 +0000 Subject: 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 --- script/public-inbox-index | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/public-inbox-index') diff --git a/script/public-inbox-index b/script/public-inbox-index index f10bb5ad..91afac88 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -42,7 +42,7 @@ GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune batch_size|batch-size=s sequential_shard|seq-shard|sequential-shard no-update-extindex update-extindex|E=s@ - skip-docdata all help|h)) + fast-noop|F skip-docdata all help|h)) or die $help; if ($opt->{help}) { print $help; exit 0 }; die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0; -- cgit v1.2.3-24-ge0c7