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:
IMAP's message sequence number to get the next and previous unique IDs. This should be really fast compared to what was done before.
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.