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.
- Store incomplete search results in session and re-send search requests
to the server if returned before complete (this should avoid hitting request timeouts).
- Display full folder path on mouseover in message list
- Remove pthreads implementation stuff as this wasn't really working
Removed rcube_result_index::intersect() method.
Changed rcube_result_index::filter() to filter in the same way as
rcube_result_thread::filter(), which means it actually does array_intersect().
Added tests scripts for rcube_result_index class.