Ticket #1485105 (closed Bugs: wontfix)
Bypass costly PHP message sorting if IMAP server support SORT
| Reported by: | jeblair | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-alpha |
| Component: | PHP backend | Version: | 0.1.1 |
| Severity: | normal | Keywords: | imap sort |
| Cc: |
Description
If an IMAP server supports SORT, RoundCube still sorts the message headers in rcube_imap (using the sorter class) nonetheless. This operation can be expensive on large mailboxes. Instead, it should take advantage of the fact that the UIDs it gets from the IMAP server are already sorted. The only part of the code wrapped by if(!$headers_sorted) that needs to be run on output from an IMAP server that supports SORT is potentially reversing the array at the end.
I'm attaching a patch that separates the functionality of sorting and reversing, so that the headers are sorted or reversed only when needed.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
