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-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 7F9DE1FA13 for ; Tue, 19 Jan 2021 09:34:35 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/9] lei q: do not spawn MUA early Date: Tue, 19 Jan 2021 09:34:29 +0000 Message-Id: <20210119093435.17955-4-e@80x24.org> In-Reply-To: <20210119093435.17955-1-e@80x24.org> References: <20210119093435.17955-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I'm not sure why, but mutt sometimes won't detect small quickly. We'll display a progress bar meter when writing results, instead. --- lib/PublicInbox/LeiToMail.pm | 4 ---- lib/PublicInbox/LeiXSearch.pm | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index 8e58ad11..99388b5b 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -439,10 +439,6 @@ sub post_augment { # fast (spawn compressor or mkdir), runs in main daemon $self->$m($lei); } -sub lock_free { - $_[0]->{base_type} =~ /\A(?:maildir|mh|imap|jmap)\z/ ? 1 : 0; -} - sub write_mail { # via ->wq_do my ($self, $git_dir, $oid, $lei, $kw) = @_; my $not_done = delete $self->{4}; # write end of {each_smsg_done} diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 45a073a0..120857b8 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -191,7 +191,7 @@ sub query_done { # EOF callback dwaitpid($_, $ipc_worker_reap, $l2m) for @$pids; } $lei->{ovv}->ovv_end($lei); - $lei->start_mua if $l2m && !$l2m->lock_free; + $lei->start_mua if $l2m; $lei->dclose; } @@ -201,7 +201,6 @@ sub start_query { # always runs in main (lei-daemon) process $lei->{1} = $io->[1]; $l2m->post_augment($lei); $io->[1] = delete $lei->{1}; - $lei->start_mua($io->[3]) if $l2m->lock_free; } my $remotes = $self->{remotes} // []; if ($lei->{opt}->{thread}) {