]> Sergey Matveev's repositories - public-inbox.git/commit
imap: remove non-UID SEARCH for now
authorEric Wong <e@yhbt.net>
Wed, 10 Jun 2020 07:05:17 +0000 (07:05 +0000)
committerEric Wong <e@yhbt.net>
Sat, 13 Jun 2020 07:55:45 +0000 (07:55 +0000)
commitd7499f74c9eed7cebb6a4e273f04c854c1674c06
treed20121ae821f483a4300361025e7d1089e6b2618
parentd33fae954f99c7241be5ef6d6447db9bdc6d648d
imap: remove non-UID SEARCH for now

Supporting MSNs in long-lived connections beyond the lifetime of
a single request/response cycle is not scalable to a C10K
scenario.  It's probably not needed, since most clients seem to
use UIDs.

A somewhat efficient implementation I can come up uses
pack("S*" ...) (AKA "uint16_t mapping[50000]") has an overhead
of 100K per-client socket on a mailbox with 50K messages.  The
100K is a contiguous scalar, so it could be swapped out for
idle clients on most architectures if THP is disabled.

An alternative could be to use a tempfile as an allocator
partitioned into 100K chunks (or SQLite); but I'll only do that
if somebody presents a compelling case to support MSN SEARCH.
lib/PublicInbox/IMAP.pm
t/imapd.t