Bostjan Skufca
2016-04-09 55d90b2f621a9c144b54b07b4e1dafd0fdad0e85
refs
author Bostjan Skufca <bostjan@a2o.si>
Saturday, April 9, 2016 09:06 -0400
committer Aleksander Machniak <alec@alec.pl>
Sunday, April 10, 2016 04:50 -0400
commit55d90b2f621a9c144b54b07b4e1dafd0fdad0e85
tree 8d9d3a35a063065a7631dcdc3f46759f1824ffe1 tree | zip | gz
parent e1ae2002014ee01bc3a556f42bf43dba80e074c8 view | diff
mailbox/listing: Make server response for large mailbox listing faster when using threaded view

Symptom
=======
When using roundcube with mailboxes with over 60k messages, list
view was way faster than viewing in threaded view.

Mailbox index view timing: ~360 ms
Mailbox threaded view timing: ~800 ms

Resolution
==========
Use native PHP array manipulation functions instead of rolling custom
string data reversal implementation using strpos() and substr() in a
'while' loop.

This optimization is already present in index view handler, but was missing
from threaded view.

Results after optimization
==========================
Both average out around ~360 ms response time.
1 files modified
18 ■■■■ changed files
program/lib/Roundcube/rcube_result_thread.php 18 ●●●● diff | view | raw | blame | history