Kolab2 architecture/format flaws

Steffen Hansen steffen at klaralvdalens-datakonsult.se
Fri May 13 09:27:31 CEST 2005

On Friday 13 May 2005 08:18, Stephan Buys wrote:
> This was a problem that was noticed early on even with the KDE
> client.
> My suggestion at the time (somewhere in 2003) was that we create some
> special headers to give loading hints to the event entries:
> For example:
> All recurring events (which would be hard to pin down) would have a
> header: X-Kolab-Event: Always  		(Meaning clients should always
> process these)
> Then events limited to certain days could have:
> X-Kolab-Event:  2005-05-13
> This way a client can go and and ask for all entries for a specific
> day. For workweek, or month views the IMAP search can just be
> expanded to include all the iterations of the different dates.
> I know Cyrus IMAPd is supposed to be able to index/cache headers so
> maybe this small change could make a big difference?

Searching on arbitrary headers is going to cause a lot of IO on the 
server because it has to scan all the messages. Only a few standard 
headers are cached. From message.c:

    message_ibuf_iov(&iov[0], &envelope);
    message_ibuf_iov(&iov[1], &bodystructure);
    message_ibuf_iov(&iov[2], &oldbody);
    message_ibuf_iov(&iov[3], &section);
    message_ibuf_iov(&iov[4], &body->cacheheaders);
    message_ibuf_iov(&iov[5], &from);
    message_ibuf_iov(&iov[6], &to);
    message_ibuf_iov(&iov[7], &cc);
    message_ibuf_iov(&iov[8], &bcc);
    message_ibuf_iov(&iov[9], &subject);

The contents of body->cacheheaders is controlled by 
mailbox_cache_headers in mailbox.c and by default X-* headers are never 
cached. But if we _really_ need it, we can patch mailbox.c and add 
X-Kolab-Event to mailbox_cache_headers.

Steffen Hansen          |       Klarälvdalens Datakonsult AB
Senior Software Engineer|       http://www.klaralvdalens-datakonsult.se
                        |       Platform-independent
                        |       software solutions

More information about the format mailing list