Jason,

> When I need to delete a message I do the following:
> 1) Open the mbox file and a work file
> 2) Copy the mbox file into the work file until I
>    reach the message to delete
> 3) Skip the copying until I've found the next message header
> 4) Continue copying the mbox file into the work file
> 5) Delete the old mbox file and rename the work file to be
>    the mbox file

> for each message of a 2000 message mbox the file will have
> to be copied 2000 times.

What if the delete operation locked the file and queued the delete for a
background thread, which would kick off in, oh let's say 1 second?  The
delete thread would run through the deletion list, and then unlock the file.
In the common case where there is either a single delete, or when POP3
deletes a whole series at once (when the POP3 session finishes), the mailbox
could do all of the deletes in a single pass, sorted by position within the
file.

        --- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to