From 70a8236cd5db7f1dee55dc9da8ee7bc49a1bf813 Mon Sep 17 00:00:00 2001 From: Bostjan Skufca <bostjan@a2o.si> Date: Sat, 09 Apr 2016 09:20:28 -0400 Subject: [PATCH] mailbox/listing: Make server response for large mailbox listing faster when using threaded view --- program/lib/Roundcube/rcube_result_thread.php | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) diff --git a/program/lib/Roundcube/rcube_result_thread.php b/program/lib/Roundcube/rcube_result_thread.php index c508a66..b80e38b 100644 --- a/program/lib/Roundcube/rcube_result_thread.php +++ b/program/lib/Roundcube/rcube_result_thread.php @@ -242,22 +242,10 @@ return; } + $raw_data_reverse = implode(self::SEPARATOR_ELEMENT, array_reverse(explode(self::SEPARATOR_ELEMENT, $this->raw_data))); + $this->raw_data = $raw_data_reverse; + $this->meta['pos'] = array(); - $datalen = strlen($this->raw_data); - $result = ''; - $start = 0; - - while (($pos = @strpos($this->raw_data, self::SEPARATOR_ELEMENT, $start)) - || ($start < $datalen && ($pos = $datalen)) - ) { - $len = $pos - $start; - $elem = substr($this->raw_data, $start, $len); - $start = $pos + 1; - - $result = $elem . self::SEPARATOR_ELEMENT . $result; - } - - $this->raw_data = rtrim($result, self::SEPARATOR_ELEMENT); } /** -- Gitblit v1.9.1