user/dev discussion of public-inbox itself
 help / color / Atom feed
* [PATCH] v2writable: disable parallelism on indexlevel=basic
@ 2019-01-01 11:50 Eric Wong
  0 siblings, 0 replies; 1+ messages in thread
From: Eric Wong @ 2019-01-01 11:50 UTC (permalink / raw)
  To: meta

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


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 11:50 [PATCH] v2writable: disable parallelism on indexlevel=basic Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox