Author petri.lehtinen
Recipients akuchling, chrisisbd, petri.lehtinen
Date 2012-06-18.08:01:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340006469.95.0.807351094479.issue9559@psf.upfronthosting.co.za>
In-reply-to
Content
This is actually not true. When calling add(), mbox (and MMDF and Babyl) append the message to the file without rewriting it.

It's the following flush() call that rewrites the whole mailbox contents. I think this could be changed to work correctly by not setting self._pending = True in _singlefileMailbox.add. This way, the file wouldn't be rewritten by flush() if messages are only appended.

OTOH, flush() should still fsync the mailbox file (if we want to ensure that the changes are really written to disk). This would probably require a new flag in addition to self._pending, to indicate that there are unsynced changes.
History
Date User Action Args
2012-06-18 08:01:10petri.lehtinensetrecipients: + petri.lehtinen, akuchling, chrisisbd
2012-06-18 08:01:09petri.lehtinensetmessageid: <1340006469.95.0.807351094479.issue9559@psf.upfronthosting.co.za>
2012-06-18 08:01:09petri.lehtinenlinkissue9559 messages
2012-06-18 08:01:08petri.lehtinencreate