From 24294059123d4edd9e31f211d72c641a5d1a0d72 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 19 Mar 2018 08:14:56 +0000 Subject: v2writable: allow disabling parallelization While parallel processes improves import speed for initial imports; they are probably not necessary for daily mail imports via WatchMaildir and certainly not for public-inbox-init. Save some memory for daily use and even helps improve readability of some subroutines by showing which methods they call remotely. --- t/v2writable.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/v2writable.t') diff --git a/t/v2writable.t b/t/v2writable.t index 771e8c17..2088f3fe 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -108,10 +108,10 @@ if ('ensure git configs are correct') { ok($im->add($mime), 'message with multiple Message-ID'); $im->done; my @found; - $ibx->search->reopen; - $ibx->search->each_smsg_by_mid('abcde@1', sub { push @found, @_; 1 }); + my $srch = $ibx->search; + $srch->reopen->each_smsg_by_mid('abcde@1', sub { push @found, @_; 1 }); is(scalar(@found), 1, 'message found by first MID'); - $ibx->search->each_smsg_by_mid('abcde@2', sub { push @found, @_; 1 }); + $srch->reopen->each_smsg_by_mid('abcde@2', sub { push @found, @_; 1 }); is(scalar(@found), 2, 'message found by second MID'); is($found[0]->{doc_id}, $found[1]->{doc_id}, 'same document'); ok($found[1]->{doc_id} > 0, 'doc_id is positive'); -- cgit v1.2.3-24-ge0c7