[Kolab-devel] kimap (imap library) Re: annotations patch in c-client what is the status?

Thomas Jarosch thomas.jarosch at intra2net.com
Thu Nov 5 10:34:38 CET 2009


On Thursday, 5. November 2009 10:01:22 Gunnar Wrobel wrote:
> ===C-client obsolete in Horde 4===
> 
> Horde 4 has a completely new Imap_Client library. This library
> implements IMAP access via two different access methods: Either via
> the c-client functions within PHP or via a pure PHP implementation
> based on the PHP socket functions (these are low-level networking
> functions).
> 
> As astonishing as it may seem: The pure PHP implementation seems to be
> significantly faster than using the c-client library implemented in C.
> The test script associated with the Imap_Client library uses 50% more
> time when running based on c-client.

Very nice! So our Kolab back end code with the ability to switch 
implementations inspired main line :)

> This does however '''not''' mean that libkimap is not interesting for
> the IMAP connectivity of the Kolab server. It could potentially be
> faster than the socket based implementation. Somebody would however
> need to package libkimap in a PECL package (or directly in PHP) and
> implement use of this backend in Imap_Client.

Here comes the troublesome part (sorry Bernhard for not replying earlier):
The library is written in C++ while PHP uses mostly C. We would need a lot 
of wrapper glue here. The new library also depends on Qt and some KDE 
libraries, this is quite a heavy dependency for a PHP module.

Maybe all the added wrapper glue kills the speed advantage, if any?
Just think of the needed string conversions QString <-> PHP string type
which are needed every time you access a message header/body etc.

At least there is already a way to interface Qt/KDE libraries
with PHP as there a Qt bindings for PHP:
http://techbase.kde.org/Development/Languages/PHP-Qt

Cheers,
Thomas




More information about the devel mailing list