Hi, We're testing roundcube in a fairly large environment (80K users, 900K mailboxes) with a cyrus imap backend. In our environment, roundcube/iloha imap's namespace discovery phase takes about 1.5 seconds on an unloaded machine. This happens on every email view.
Iloha has the ability to skip the namespace discovery phase if a imap_root is configured and roundcube has a configuration option for imap_root. But the two aren't connected! By handing off the imap_root variable to iloha mail sooner rather than later we cut our time to view a message from 1.7 seconds to 0.2 seconds.
I've submitted a patch with this ticket: http://trac.roundcube.net/ticket/1485172
Please let me know if there's anything I can do to help get this accepted.
Thanks, Ziba
hi ziba,
Ziba Scott wrote:
Hi, We're testing roundcube in a fairly large environment (80K users, 900K mailboxes) with a cyrus imap backend. In our environment, roundcube/iloha imap's namespace discovery phase takes about 1.5 seconds on an unloaded machine. This happens on every email view.
Iloha has the ability to skip the namespace discovery phase if a imap_root is configured and roundcube has a configuration option for imap_root. But the two aren't connected! By handing off the imap_root variable to iloha mail sooner rather than later we cut our time to view a message from 1.7 seconds to 0.2 seconds.
I've submitted a patch with this ticket: http://trac.roundcube.net/ticket/1485172
thank you for your patch. i would like to add two things:
if rcmail::get_instance()->config->get('imap_root') gives an empty string, the patch renders roundcube unusable. (ok, i internally ported the patch back to 0.1.1 - maybe rcmail::get_instance()->config->get('imap_root') takes care of that)
normally i am against the usage of globals in such a way. but this is better than nothing :) (note: i did not check the iil sourcecode if there is a better way to achieve that)
cheers, raoul
Ziba Scott wrote:
Hi, We're testing roundcube in a fairly large environment (80K users, 900K mailboxes) with a cyrus imap backend. In our environment, roundcube/iloha imap's namespace discovery phase takes about 1.5 seconds on an unloaded machine. This happens on every email view.
Hmm, this seems to be a bottleneck of your IMAP server. With my (remote over ADSL) IMAP server, the namespace discovery takes 128 ms.
Iloha has the ability to skip the namespace discovery phase if a imap_root is configured and roundcube has a configuration option for imap_root. But the two aren't connected! By handing off the imap_root variable to iloha mail sooner rather than later we cut our time to view a message from 1.7 seconds to 0.2 seconds.
I've submitted a patch with this ticket: http://trac.roundcube.net/ticket/1485172
This could work but we need to test with very well to make sure it does not break anything else. For example, the namespace command also returns the folder delimiter. If this is not set, RoundCube uses iil_C_GetHierarchyDelimiter() to fetch it separately. I hope that this operation does not take another 2 sec :-)
Also when looking at the code in imap.inc, if $my_prefs["rootdir"] is set, iil_C_NameSpace() is quit but $conn->rootdir (which is used by the rcube_imap class) isn't set.
This patch really needs to be tested with several different IMAP servers.
~Thomas
List info: http://lists.roundcube.net/dev/
Thomas Bruederli wrote:
Hmm, this seems to be a bottleneck of your IMAP server. With my (remote over ADSL) IMAP server, the namespace discovery takes 128 ms.
Correction: it only takes 12-18 ms on my system connecting to Dovecot. I messed up some decimals...
~Thomas _______________________________________________ List info: http://lists.roundcube.net/dev/
Hi,
Thanks for your feedback so far.
We submitted a similar patch to Horde/IMP and they, not surprisingly, had a similar reaction: What the heck is taking your Cyrus server 1.5 seconds?!
The rough answer is that we have around one million mailboxes stored in a non-hierarchical fashion, in part to enable mailbox sharing. In general this works very well for us and our IMAP service runs smoothly with good flexibility, but certain actions which cause the entire database to be loaded or iterated over can take 1.5 seconds. We've found that those cases can be avoided by favoring configuration over discovery.
I can see that the patch as is needs testing with other IMAP servers. Alternatively, we could restructure to patch to be entirely separate from RC's current use of the imap_root preference to avoid introducing any new behavior except when explicitly configured. Something like:
// Skips discovery and uses rcmail_config['imap_root'] and rcmail_config['imap_delimiter'] $rcmail_config['skip_imap_discovery'];
Either way we're happy to do more testing, but it would be excellent if anyone with other IMAP backends already configured could test it out too.
Thanks, Ziba