Right, take 2 :)

This mbox driver now uses .lock files when updating the underlying files

The only items stored in memory are the keys and the offsets of the
messages in the mbox file. This allows me to seek() to the correct
message without having to re-read and parse the file each time a message
is read.

If the mbox is very large (>50 messages) then I've found that the remove
performance is unusably bad. Therefore I use another thread to delete
the messages when I have time (write-behind). The current set up will
only use the thread when the message count exceeds 50, so people with
small inboxes will not suffer the extra thread unless they need it.

I've now tested this new method on the gcc mailing list archive in mbox
format. A mbox file of 2.5k messages takes about a minute to list(),
retieve() and remove() using the new system. Before the behind-time
thread writer it took about 1/2 a day... (This is on a 667Mhz Pentium
III)

-- Jason

Attachment: mboxdriver.zip
Description: Zip compressed data

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

Reply via email to