On 12/16/09 5:18 AM, Patrick Ohly wrote:
I fell it will be slower compared to the other approach. You dont
rewrite the file entirely at all in normal usage.
Setting mail flags was mentioned as the reason for not using maildir.
Adding a mail flag to an mbox mail requires rewriting the whole file. Or
do you assume that you can overwrite just some bytes in an existing mail
That will still lead to writing a complete sector to disk, in contrast
to renaming a file which I expect to be implemented more intelligently
by the file system. Actually, writing a micro-benchmark for this is
doable. Before you seriously consider investing effort into this, I'd
really prefer to see some hard data for a "rename vs. rewrite"
Ever since the early controversy in ext4 over lost data in KDE
configuration files, file renames force an ordered journal commit in ext4.
So file rename is more expensive than you may think.
This is of course still cheaper than fsync, if Evolution makes a habit
of fsync'ing its email files.
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil."
Evolution-hackers mailing list