I'm planning on throwing this together soon, but I wanted to do a sanity
check with folks before doing so.
Currently, the performance of free IMAP servers at certain operations is
very bad for large folders. The primary reason is that maildir (and
maildir++) has no indexing at all. This means that to sort a folder, you
have to open every message, read the headers, locate the one(s) you
need, and transform them into sortable format. Once you've read every
message, then you can sort. This leads to woeful performance. On a
Pentium 4 with 800mhz memory bus, I clocked Courier-IMAP taking ~14
seconds to sort a 12.5k message folder by date.
I'm looking at hacking maildrop and Courier-IMAP to maintain
fixed-length record list files containing the message headers needed to
support standard SEARCH, SORT, and THREAD operations. At a wild guess,
this should provide an order of magnitude speed improvement.
Clearly, for a webmail system, you want the server to be able to sort
the messages fast, because all sorts happen on the imap server. If
anyone else here is interested in this hack, has thoughts, or feedback-
I'm all ears.
Cheers
Ross