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 81A9B1F770 for ; Tue, 1 Jan 2019 11:50:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] v2writable: disable parallelism on indexlevel=basic Date: Tue, 1 Jan 2019 11:50:25 +0000 Message-Id: <20190101115025.29655-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: There is no need for parallelism if we're not using Xapian. --- lib/PublicInbox/V2Writable.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 152d90a..0731964 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -223,11 +223,16 @@ sub idx_init { # frequently activated. delete $ibx->{$_} foreach (qw(git mm search)); - if ($self->{parallel}) { - pipe(my ($r, $w)) or die "pipe failed: $!"; - $self->{bnote} = [ $r, $w ]; - $w->autoflush(1); - } + my $indexlevel = $ibx->{indexlevel}; + if ($indexlevel && $indexlevel eq 'basic') { + $self->{parallel} = 0; + } + + if ($self->{parallel}) { + pipe(my ($r, $w)) or die "pipe failed: $!"; + $self->{bnote} = [ $r, $w ]; + $w->autoflush(1); + } my $over = $self->{over}; $ibx->umask_prepare; -- EW