On Feb 26, 2006, at 11:56 PM, Leonard Bouchet wrote:
Hum, that's a good question I can't find an answer for the moment. To be sure we correctly identified the problem, could you simply replace the rcube_imap.inc::message_index function with the one below (around line 643)? This one only issues a sort command without checking the cache at all. If the problem persists when you see a new message (with the list sorted by something else than date_DESC), that's effectively strange, because it does a lot less than the _list_headers function, so should be significantly faster, or at least equal.
It was very fast (and of course the prev/next email links didn't work) so it was the behavior you expected. Significantly faster, yes, given that otherwise clicking on a message in a large sorted box is so slow it doesn't complete. With the simplified function, it took like 1.5 seconds.
To further test, I would also like you to get the running time of the commands directly sent to the imap server. You could do something like
$ telnet imap-server.example.org 143 c1 LOGIN username password c2 SELECT your_huge_mailbox_name c3 SORT (SUBJECT) US-ASCII ALL # how much time does it take to get the answer?
c3 OK Completed (12592 msgs in 0.633 secs)
c4 UID SORT (SUBJECT) US-ASCII ALL # how much time does it take to get the answer?
c4 OK Completed (12592 msgs in 0.633 secs) Its fast. -- Mark Edwards
