RoundCube and performance
|Reported by:||Emil Wojak||Owned by:|
Since RoundCube behaves rather poorly on my machine, I decided to find out what takes it so long.
At first I thought it might be network related, but a bit of tcpdump sniffing at the server side showed it's not - a single HTTP request for fetching messages list is processed for about 4-5 seconds by the server.
It's not the IMAP server that's slowing down either - Dovecot responds nearly instantly even for sorting requests in mailboxes filled with about 2000 messages (Wireshark screenshot with packet times attached).
While being profiled, the script executed about 5 times longer, so the whole transaction took about 22 seconds. But still the proportions of timings are very informative.
I think here is some place for improvements:
- rcube_imap->_list_headers sorts messages even though IMAP server has sorting capabilities.
- RoundCube could use the capabilities advertised in the IMAP greeting response if the server does provide them. That would save one request to the server, although this doesn't have that much impact on speed, especially on local installations.
The tests were taken on a Celeron 366 MHz machine which is rather of the antique kind, nevertheless RC could be faster just to defer high loads, regardless of the server speed. My RC was configured to list 40 messages per page.
Hope this will at least inspire someone to think of optimisation.