Closed dw closed 10 years ago
You can try it out on a huge mailbox here: http://k2.botanicus.net/qemu-all.mbox.bz2 ... warning 350mb download, extracts to 1.9GB
How would you feel about a slightly more ambitious refactor of all the FILE* code? /bin/cat can read the mailbox in 200ms, I don't see why mutt needs much more than double that...
Since mutt does not use threads, there is no reason it should use the locked variants of the FILE* IO functions. This checks if the unlocked functions are available, and if so enables them globally via mutt.h.
Cuts load time for a 56k message, 1.8GB /var/mail mailbox from 14 seconds to ~6 seconds, since we avoid acquiring and releasing a mutex for every character of input read.
Before: 0m14.376s
After: 6 seconds