]> Sergey Matveev's repositories - public-inbox.git/commit
imap: speed up HEADER.FIELDS[.NOT] range fetches
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:04:19 +0000 (07:04 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commit05978869826c50252d49a7977470ee3107eb2d16
tree3f760eb01af3f6ec5f68411584d8a19e4c6b6521
parent1804e2961f3a28045b601a982f44ff61ea33a2fe
imap: speed up HEADER.FIELDS[.NOT] range fetches

While we can't memoize the regexp forever like we do with other
Eml users, we can still benefit from caching regexp compilation
on a per-request basis.

A FETCH request from mutt on a 4K message inbox is around 8%
faster after this.  Since regexp compilation via qr// isn't
unbearably slow, a shared cache probably isn't worth the
trouble of implementing.  A per-request cache seems enough.
lib/PublicInbox/IMAP.pm
t/imap.t