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