[dev] Horde imap client performance

Ruu Gulin ruu.gulin at gmail.com
Thu Jul 14 15:54:59 UTC 2011


Hi,

I'm trying to use the Horde Imap Client Module in a webapplication to fetch
emails. It works very well and fast with a local test server ( ~0.1s for
login+fetch envelope), but it's much slower using a remote imap server.

Of course this is expected, but i'm suprised about the difference to the PHP
imap extension. Horde Imap takes ~3s for every single request, while the imap
extension needs less than 0.5s. So I think i might be doing something wrong with
the Horde Imap Client but can't find the reason for this (I tried different
remote imap servers and another webserver with the same result). Does anyone
have an idea what could cause such slow requests?

The Horde Framework (4) runs on Apache/Php 5.3 with eAccelerator. The test was
just a simple fetch query:

$imap = Horde_Imap_Client::factory(...);
$imap->login();
$query = new Horde_Imap_Client_Fetch_Query();
$query->envelope();
$result = $imap->fetch("INBOX",$query);

Another thing I noticed is, unlike all other parts of the mails, the envelope is
not decoded with Horde_MIME::decode(), so it needs to be done later. Is there a
reason why the decoding of the envelope to utf-8 shouldn't be done in Socket.php?




More information about the dev mailing list