On Wed, Nov 30, 2011 at 19:40, A.L.E.C alec@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?
The problem is that in described case we'd need to call UID SEARCH ALL. Even so, I think it's worth to do this. Any thoughts on this?
Would the result of UID SEARCH ALL be small enough to fit into memory?
But in general I think we should follow this idea and if it turns out, that IMAP backend support is granted, it would certainly simplify things.
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/ BT/aba52c80