From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9ED8B1F5AE for ; Thu, 6 May 2021 01:53:36 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_rediff: reduce overhead of tmp store Date: Thu, 6 May 2021 01:53:36 +0000 Message-Id: <20210506015336.30132-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiRediff.pm b/lib/PublicInbox/LeiRediff.pm index deb6c3ae..3c8ebe41 100644 --- a/lib/PublicInbox/LeiRediff.pm +++ b/lib/PublicInbox/LeiRediff.pm @@ -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 ];