]> Sergey Matveev's repositories - public-inbox.git/commit
lei_to_mail: optimize for MUAs
authorEric Wong <e@80x24.org>
Mon, 18 Jan 2021 10:30:32 +0000 (04:30 -0600)
committerEric Wong <e@80x24.org>
Mon, 18 Jan 2021 21:20:32 +0000 (21:20 +0000)
commit935f837e759f03ed48d369ab97517b8b03662ba3
tree861a7c99e9d436c551ccd2bebb5ceee2e3b9c5c8
parent51191d611e918ff3ef6e9ce8ee52ba7b2cd2144c
lei_to_mail: optimize for MUAs

Instead of optimizing our own performance, this optimizes
our data to reduce work done by the MUA consumer.

Maildir and mbox destinations no longer support any notion of
the IMAP \Recent flag.  JMAP has no functioning \Recent
equivalent, and neither do we.

In practice, having MUAs (e.g. mutt) clear the \Recent flag when
committing changes to the mbox is expensive: it creates a
rename(2) storm with Maildir and overwrites the entire mbox.

For mboxcl2 (and mboxcl), we'll further optimize mutt behavior
by setting the Lines: header in addition to Content-Length.

With these changes, mutt exits instantaneously on mboxcl2,
mboxcl, and Maildirs generated by "lei q".
lib/PublicInbox/LeiToMail.pm
t/lei_to_mail.t
t/mbox_reader.t