[imp] Question to IMP and the function builMailboxArray()

Michael M Slusarz slusarz at horde.org
Wed Oct 4 07:13:45 PDT 2006


Quoting Niels Vornholt | OGVIT <n.vornholt at ogvit.de>:

> Hello Michael,
>
> I recognised that you are the Author of the IMP-Class "IMP_Mailbox",
> so I hope I took the right way asking my question in writing you this
> email. I really hope I don?t bother you with that, but I searched the
> mailinglists and other resources for a solution and didn?t find proper
> infos...
>
> I spent a while looking at the code of the function buildMailboxArray()
> and as far as I got it, the php-function imap_fetch_overview() is used
> for building the inbox list.
> When I turn on the setting "showAccountColors" in conf.php, the
> php-function imap_fetchheader() is used for each message-uid as well.
> Did I get that right?
> So we do two IMAP-calls for each message, which is quite understandable,
> because we can?t get the X-Color-entry with imap_fetch_overview()...
>
> My question is: As one of the main developers and an "IMP-Expert", do
> you see any way to fetch all necessary information (including X-Color)
> of an email with one IMAP-call?

No.  And there is nothing we (as Horde/IMP developers) can do about  
it.  We can only use the imap_*() functions provided to us by PHP.   
imap_fetch_overview() provdes information that imap_fetchheader()  
doesn't and vice versa.

> The reason for my question is that we try to use IMP as a Webmailer with
> large inboxes and realized a huge performance gain in turning
> "showAccountColors" off. But the feature is really great and we want to
> use it, so we are looking for a way to improve performance here...

Consider upgrading to IMP HEAD and taking advantage of the mailbox  
caching available there.  If activated, imap_fetchheader() only needs  
to be called once over the lifetime of a message in a mailbox.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]


More information about the imp mailing list