Thomas Bruederli wrote:
It looks good so far. With this changes we'll always fetch the BODYSTRUCTURE when reading the message headers. Well this is actually some overhead, especially when just listing a mailbox. The message structure is only needed when a message is displayed and the new mechanism will probably fetch too much data that is never used. It reduces the number of fetches but one FETCH command will probably take longer because the bodystructure has do be created by the IMAP server.
Don't get me wrong, these are just some worst-case thoughts and I didn't do any speed-tests on my environment so far. I just question your calculations about the performance improvements. The 10+3 fetches on a 800 message mailbox only occur if you open all of those mails but not when they're just listed.
You're right, but my speed-tests don't confirm your concerns. There's no difference on my mailbox (pagesize=100, 7000 messages in folder) using dovecot-1.0. Fetch for headers of a hundred messages tooks 0.2 to 0.3 sec. (with or without bodystructure). For pagesize=1000 it's ca.0.5 sec. and then the difference is more noticeable (up to 20%).
We can skip bodystructure in fetch for messages listing, but it will require additional fetch when displaying message and cache is enabled. So, in my opinion, it will be simpler to do more performance tests and use the patch as is.