summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-16 07:53:53 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-16 07:53:53 +0000
commitc90ef76ef3ab75ffdf2df3f574956f9e02a8f20f (patch)
tree819b38b93fa1e9be8d551674c6b167e7fdd3639b /roundcubemail
parent10ca33cec428d04faf25eeacfd3f52de37e72339 (diff)
- use memory less expensive method of searching when result is bigger than page size
git-svn-id: https://svn.roundcube.net/trunk@2059 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/include/rcube_imap.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index 7e2221884..9b507028c 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -674,7 +674,7 @@ class rcube_imap
}
else { // SEARCH searching result, need sorting
$cnt = count($msgs);
- if ($cnt > 300) { // experimantal best result
+ if ($cnt > 300 && $cnt > $this->page_size) { // experimantal value for best result
// use memory less expensive (and quick) method for big result set
$a_index = $this->message_index($mailbox, $this->sort_field, $this->sort_order);
// get messages uids for one page...