]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_rediff: reduce overhead of tmp store
authorEric Wong <e@80x24.org>
Thu, 6 May 2021 01:53:36 +0000 (01:53 +0000)
committerEric Wong <e@80x24.org>
Thu, 6 May 2021 02:28:39 +0000 (02:28 +0000)
We don't need Xapian positional info when searching
for blob pre/post-images.  Furthermore, rediff will
usually be used for a single email or at most, one
patchset.  So there's little point in parallelizing
or having multiple shards.

lib/PublicInbox/LeiRediff.pm

index deb6c3aed2f792f07841611a2cd6df8338b8691d..3c8ebe4183f41dc3ed126c38416ec2cc3671f931 100644 (file)
@@ -239,7 +239,9 @@ sub ipc_atfork_child {
        $self->{blobs} = {}; # oidhex => filename
        $self->{rdtmp} = File::Temp->newdir('lei-rediff-XXXX', TMPDIR => 1);
        $self->{tmp_sto} = PublicInbox::LeiStore->new(
-                       "$self->{rdtmp}/tmp.store", { creat => 1 });
+                       "$self->{rdtmp}/tmp.store",
+                       { creat => { nproc => 1 }, indexlevel => 'medium' });
+       $self->{tmp_sto}->{priv_eidx}->{parallel} = 0;
        $self->{rmt} = [ $self->{tmp_sto}->search, map {
                        PublicInbox::LeiRemote->new($lei, $_)
                } $self->{lxs}->remotes ];