Sandro Pazzi wrote:
Hi all, I have modified the code in the rcube_imap.php and the performance was good. I post the code modified:
Original: $a_index = iil_C_FetchHeaderIndex($this->conn, $mailbox, "1:*", $this->sort_field, $this->skip_deleted); list($begin, $end) = $this->_get_message_range(count($msg_index), $page);
Modified: $max = $this->_messagecount($mailbox,'ALL',true); list($begin, $end) = $this->_get_message_range($max, $page);
$a_index = iil_C_FetchHeaderIndex($this->conn, $mailbox,
($begin+1).":".$end, $this->sort_field, $this->skip_deleted);
Can u please check for some errors or issue?
You don't understand. In our code we're fetching all messages headers and we're sorting them by (e.g.) date first, then we're fetching a part needed for the one list page. In your code, you're fetching only part of the list and you're sorting that part not all messages. This is not proper because "default sorting" is not "sorting by date". This sometimes would be ok, but definetly not when sorting by subject and even by date.
So, we'll not break things to get better performance.