diff options
author | Eric Wong <e@80x24.org> | 2019-01-01 11:50:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-02 08:33:39 +0000 |
commit | 7daecda382e558c93304cccfa0285f66f35015ab (patch) | |
tree | 786d5ca0ebf57c5abcff1ff24b72a7b7f1470699 /lib | |
parent | bf7315de01fecc74ff8807921a993145886a8007 (diff) | |
download | public-inbox-7daecda382e558c93304cccfa0285f66f35015ab.tar.gz |
There is no need for parallelism if we're not using Xapian.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 152d90ab..07319646 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; |