From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: Re: [PATCH 1/2] lei q: parallelize Maildir and mbox writing
Date: Mon, 18 Jan 2021 21:19:54 +0000 [thread overview]
Message-ID: <20210118211954.GA28437@dcvr> (raw)
In-Reply-To: <20210118103032.1430-2-e@80x24.org>
Eric Wong <e@80x24.org> wrote:
> diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
<snip>
> @@ -14,6 +15,8 @@ use Symbol qw(gensym);
> use IO::Handle; # ->autoflush
> use Fcntl qw(SEEK_SET SEEK_END O_CREAT O_EXCL O_WRONLY);
> use Errno qw(EEXIST ESPIPE ENOENT);
> +use File::Temp 0.19 (); # 0.19 for ->newdir
File::Temp is unnecessary, will squash this in:
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index 17d48a90..8d030227 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -15,7 +15,6 @@ use Symbol qw(gensym);
use IO::Handle; # ->autoflush
use Fcntl qw(SEEK_SET SEEK_END O_CREAT O_EXCL O_WRONLY);
use Errno qw(EEXIST ESPIPE ENOENT);
-use File::Temp 0.19 (); # 0.19 for ->newdir
use PublicInbox::Git;
my %kw2char = ( # Maildir characters
My initial attempt at making this change didn't have the
{each_smsg_done} pipe performing keepalive. Instead it created
another tmpdir copy of the tmpdir created by LeiXSearch->git.
That was ugly and didn't work, since it was possible for for the
original LeiXSearch->git tmpdir to go out-of-scope before the
lei2mail worker even got a chance to copy the bare directory
and its alternates file.
The {each_smsg_done} pipe is much nicer since the kernel can
keep track of in-flight pipes and doesn't inflict extra FS
activity.
next prev parent reply other threads:[~2021-01-18 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 10:30 [PATCH 0/2] lei q: write faster, mutt does less work Eric Wong
2021-01-18 10:30 ` [PATCH 1/2] lei q: parallelize Maildir and mbox writing Eric Wong
2021-01-18 21:19 ` Eric Wong [this message]
2021-01-18 10:30 ` [PATCH 2/2] lei_to_mail: optimize for MUAs Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210118211954.GA28437@dcvr \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).