<<< Date Index >>>     <<< Thread Index >>>

Re: Mark messages in mailbox as read without massive performance hit?!



On Wed, Dec 28, 2005 at 04:39:22PM -0800, Arias Hung wrote:
> in order to mark all messages in a particular mailbox as read, however also 
> using Maildir format results in a rather horrific performance hit should 
> the mailbox contain more than even fifty or so messages.

If you want this to be faster, switch to mbox.  It's a problem which
is inherent in the maildir format.  One-message-per-file formats means
that when you want to modify a bunch of messages, each file must be
opened, modified, written, and closed.  That's inherently way more
expensive than doing the same thing with an mbox-style format.

[Actually in the case of maildir, the status flags are stored as part
of the file name.  So in reality, it is the same file (the directory)
which is being modified each time.  But it is still done once per
message, so the above still applies.]

> Does anyone have a more fluid quickfix that would be kind enough to
> post?  

Not going to happen.  It might help to switch to a different
filesystem which is optimized for many small files; but even still,
mbox is inherently way, way faster for this operation.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

Attachment: pgphUTlNZb4i2.pgp
Description: PGP signature