[dev] I/O hammering (was: imp folder prefix)
Anil Madhavapeddy
anil@recoil.org
Wed, 30 May 2001 00:52:58 +0100
Egan wrote:
>
> IMP repeats this agonizing cycle for each remaining
> message. Just to build the message list. Arrrgghhhh!!!!
That was an excellent trace - thanks for taking the trouble to do that!
Hrm, so Outlook does just a single sequence fetch for the entire range
of messages, whereas we do individual ones. I can see why this hits UW
harder - since all the messages are bundled in mbox format, it would be
more efficient for it to do this in one go; in Courier-IMAP's case, the
individual maildir files would have to be opened anyway.
This needs pondering ... looking at mailbox.php, we currently do several
imap_header() calls - however, this can't be replaced with
imap_headers() since it isn't granular enough (doesn't allow the
selection of a range of headers to return, only all of them). Also, we
imap_fetchstructure() to determine what icon to put in beside the
message.
Anil