Hi! I have another great patch from my performance fixes set ;) I've observed that when message is displayed (with disabled cache) we have:
message contains several attachments) 4. FETCH for body
So, here's the patch which joins 1. and 2. into one command call and joins all fetches from 3. into one command call. Speed up is significant for all messages, specially for those having many attachments. Imagine a message with ten attachments. Previously there was ca.10 + 3 fetches * 0.2 sec. (in my mailbox with ca.800 messages) = 2.6 sec. Now, only 3 fetches * 0.2 = 0.6 sec.
I'm posting this here, because it's too late to commit such changes (not tested well) before 0.2-stable release. So, enjoy and test in your environments.
ps. Thomas, maybe you can wait a few days and review this patch to include in 0.2-stable? It would be nice.