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

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



On Wed, Dec 28, 2005 at 07:59:26PM -0500 I heard the voice of
Derek Martin, and lo! it spake thus:
> 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.

That doesn't make any sense.  Setting message flags in a maildir is
just a rename(); doing it in a mbox requires rewriting the whole mbox
from the Status: line of the first message you're changing.  It's a
lot *CHEAPER* in a maildir than in a mbox, unless your filesystem is
totally nuts.  Updating status flags is a big reason I switched to
maildir years ago for active mailboxes; it takes fractions of a second
to mark a few hundred mails read, instead of many seconds writing out
new data.


-- 
Matthew Fuller     (MF4839)   |  fullermd@xxxxxxxxxxxxxxx
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.