[RCD] IMAP operations performance

Cor Bosman cor at xs4all.nl
Tue Dec 6 11:50:17 CET 2011

> On Wed, Nov 30, 2011 at 19:40, A.L.E.C <alec at alec.pl> wrote:
>> I'm currently working on some improvements in our code e.g. to make
>> possible to open a folder with 100k messages and make memory_limit to
>> not exceed on this operation.
>> I've found that we have one optimization for messages listing. It's used
>> when skip_deleted=false and message_sort_col='' and no threading. So,
>> this is a corner case when we don't need to fetch the list of message
>> UIDs nor IDs from server, but we build the array of IDs on range(1,
>> $max), see line 1529 of rcube_imap.php.
>> This solution is good for performance in this one case, but if we could
>> get rid of it and always work with UIDs only, we would have much simpler
>> code and possibly more performant in other places (including caching)
>> because there would be no need for id-to-uid mapping.
> Any information about the support of UID search with ranges (e.g. UID
> 83:*) in the current IMAP servers?

Works fine in dovecot:

. UID search 83:86
* SEARCH 450965 450966 450967 450968

Alec, is there a reason to allow for no-sorting? Isn't that pretty much the same as sorting date column on arrival?  For dovecot sorting date on arrival is super fast.

Im fine with removing the special case if that helps RC. 


List info: http://lists.roundcube.net/dev/

More information about the Dev mailing list