[plug] Mailbox speeds (was [OT] Gmail Opinions)

Cameron Patrick cameron at patrick.wattle.id.au
Fri Jun 18 07:47:35 WST 2004

Bernard Blackham wrote:

| On Thu, Jun 17, 2004 at 05:44:23PM +0800, Cameron Patrick wrote:
| > That's one of my major complaints about mutt.  Even on relatively fast
| > modern IDE discs, it can take the better part of a minute to open a
| > large folder.  I'd love to see it be O(1) for opening a folder;
| > there's no technical reason why it can't be with a little caching.
| It would still be O(n), as presumably your cache/index would get
| larger as you grew more messages. Even still, I agree that it could
| still be done much faster ...

No it wouldn't -- if you kept the index sorted then you would only have
to read one pageful of messages from it at a time.  You could avoid
having to the the contents of the mailbox if you stored the folder's
mtimes in the index and only refreshed it when you needed to.

Also, it would be slightly worse than O(n) to read in the whole index
because as the index grew it would be more likely to get fragmented
and while modern discs are very quick when it comes to reading in
hundreds of megabytes sequentially, having to seek around the disc is
very very slow.  This effect is admittedly rather small if you're only
talking about reading in an index, but it's very noticeable when
you're reading in a whole maildir: a folder of <1000 messages opens in
less than a second, a folder of a few thousand messages opens in a few
seconds, and a folder of 35000 messages opens in over a minute and a
half (1:40 according to my stopwatch).

| I've been meaning to give Dovecot 1.0-test16 a twirl, released two
| days ago. (It's still fairly beta, definitely not for production
| systems). Amongst other things, the author Timo notes:
| ----
| So, the biggest change in 1.0-test15 is a new fully functional
| superfast mbox code. [...]

Bleh, mboxes!  :-P

I'm using dovecot 0.99.x on my server at home (and will probably
switch to using it rather than Courier at work), and it's blindingly
fast even for very big maildirs with some IMAP clients -- SquirrelMail,
for instance -- reasonably fast for others (Kmail, Evolution) and dog
slow for mutt.  Once again, mutt's IMAP code is a long way from being



More information about the plug mailing list