]> Sergey Matveev's repositories - public-inbox.git/commit
imap: FETCH: proper MSN => UID mapping for requests
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:05:19 +0000 (07:05 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commitc5fb8d66dfc1fa7034c6e7350bc6474cdde6b6a7
tree655e521dc767e3728d3b8c20a7b40da94aa7b1e7
parentba5b07877f468a3d233a1bba95eabe35ba7336e1
imap: FETCH: proper MSN => UID mapping for requests

This finally seems to make mutt header caching behave properly.

We expect to be able to safely load 50K IV/UVs in memory without
OOM, since that's "only" 1.6 MB that won't live beyond a single
event loop iteration.  So create a simple array which can
quickly map MSNs in requests to UIDs and not leave out messages.

MSNs in the FETCH response will NOT be correct, since it's
inefficient to implement properly and mutt doesn't seem to
care.

Since the conversion code is easily shared, "UID SEARCH" can
allow the same MSN => UID mapping non-UID "FETCH" does.
lib/PublicInbox/IMAP.pm