From: Eric Wong Date: Wed, 10 Jun 2020 07:05:19 +0000 (+0000) Subject: imap: FETCH: proper MSN => UID mapping for requests X-Git-Tag: v1.6.0~385 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c5fb8d66dfc1fa7034c6e7350bc6474cdde6b6a7;hp=c5fb8d66dfc1fa7034c6e7350bc6474cdde6b6a7;p=public-inbox.git 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. ---