Bostjan Skufca
2016-04-09 70a8236cd5db7f1dee55dc9da8ee7bc49a1bf813
refs
author Bostjan Skufca <bostjan@a2o.si>
Saturday, April 9, 2016 09:06 -0400
committer Bostjan Skufca <bostjan@a2o.si>
Saturday, April 9, 2016 09:20 -0400
commit70a8236cd5db7f1dee55dc9da8ee7bc49a1bf813
tree 4d8ddca8628e161a7b8ef191651efafafa82e16a tree | zip | gz
parent 4fdcd8c9d166b5bbeba698aea50be83a062ba42a 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