Optimization in KDE-PIM
Speed up switching folders a bit:
- Actually make use of mmap again, this will make calls to KMMsgBase::getLongPart() a lot faster
- call KMMsgBase::date() less by putting it on the outside of the loop.
In fact, I think this loop is unnecessary, performance seems to be much better without it.
Both things above only speed up switching to folders that have the same subject often, like commit folders.
Most slowness still comes from KMFolderIndex::find(), which uses QVector::indexOf, which is too slow for a folder with 20k messages.