6.0.0-beta13
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/11/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#6972] mailbox listing speed-up (IMAP_Tree rewrite)
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ .. ,\ /. . [__) | \./ >< |\/| [__)\__| | / \| |
Comment
> After our recent horde/imp upgrade at umich, we've seen login times rise > > from ~5-10 seconds to ~10-30 seconds. The bulk of this time is spent > > building the mailbox list in IMP_Tree (imp/lib/IMAP/Tree.php). We've > > made some changes which dramatically reduce the IMP_Tree startup time > > and would love some feedback and basic sanity checking before we move > > forward with them. > > > > On an unloaded test server in our environment, imap_getmailboxes and > > imap_list commands can take up to 1.7 seconds each against our Cyrus system. > > > > First, IMP_Tree calls imap_getmailboxes for each namespace with a % > > appended to get one level deep of subfolders. > > > > Second, IMP_Tree::_initSubscribed executes imap_list for each namespace > > with an * appended to get all sublevels of folders. > > > > Last, it recursively crawls each folder found during the first set of > > imap_getmailboxes and calls imap_getmailboxes on each folder with % > > again until all branches have been plumbed. > > > > Our improvements are premised on the fact that one level searches (%) > > and searches which return full trees of results (*) actually take the > > same time to return from Cyrus. So we are bypassing all other searches > > and starting off with one single full (*) search from the root of the > > user's mailbox. > > > > One quirk we had to side step then was that % searches will return > > objects for folders which have children that can't be directly accessed > > themselves. The * search will not. > > > > So we just iterate through the php data structure and detect parentless > > children and fake up an object for them. Then, if tree_view is turned > > on, we separate non-personal mailboxes into IMPTREE_OTHER_KEY and > > IMPTREE_SHARED_KEY. > > > > Since the list of folders at this point has all the children, we bypass > > the recursive calls to expand. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers