Large mailboxes
Leonard Bouchet
roundcube at alternative.ch
Sun Feb 26 23:00:47 CET 2006
Hi,
On 26 févr. 06, at 15:05, Thomas Bruederli wrote:
> Mark Edwards wrote:
>> Having a quick look at message_index in program/include/rcube_imap.inc
>> it appears that it returns an array of the index data for the whole
>> mailbox. Why is this necessary to retrieve the UID for two messages?
>> Surely there is a better way to do this?
>
> If you find one, please let me know...
Could you test the attached patch? It basically does 2 things:
1. If sorting is in default mode (date_DESC) or disabled, just use
IMAP's message sequence number to get the next and previous unique IDs.
This should be really fast compared to what was done before.
2. If the user sorts the message's list, only do a ' UID SORT' command
instead of 2 ' SORT' and ' FETCH' and get the next and previous IDs
from the returned array. I'm not totally convinced this will really
improve performance, but may deserve a try. We could also improve
things caching the resulting array in the session while we display the
list, but I'm not really sure it's a good idea, due to inconsistencies
it may add.
It seems to work for me, let me know if it does for you ... and make a
backup before applying the patch, you never know :)
Regards,
-l
Note: I also tried to fix some sorting bugs I found in
rcube_imap::_list_headers. This could eventually find a way to the main
tree also, if Thomas has the time to check it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prev-next-fix.patch
Type: application/octet-stream
Size: 7759 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20060226/f87d162b/attachment.obj>
More information about the Dev
mailing list