summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-04 09:58:37 +0000
committeralecpl <alec@alec.pl>2010-06-04 09:58:37 +0000
commit309f49f09bc8b663a3ddf834ca0e79f909a0928c (patch)
treed7f123008e3555cab63bf61b3d8d8c67dc10406c /program/include/rcube_imap.php
parentffd3e2906854ff985974be070b224beb38f4fae9 (diff)
- performance improvement: skip SEARCH command when mailbox is empty and SEARCH is called just after SELECT
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 09ea4df5e..55b082048 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -476,11 +476,7 @@ class rcube_imap
$search_str .= " UNSEEN";
// get message count using SEARCH
// not very performant but more precise (using UNDELETED)
- // disable THREADS for this request
- $threads = $this->threading;
- $this->threading = false;
- $index = $this->_search_index($mailbox, $search_str);
- $this->threading = $threads;
+ $index = $this->conn->search($mailbox, $search_str);
$count = is_array($index) ? count($index) : 0;