[Kde-pim] Store Kaddressbook photos outside of VCF file?

Volker Krause vkrause at kde.org
Tue Jul 1 12:42:04 BST 2008


On Sunday 29 June 2008 21:03:17 Dotan Cohen wrote:
> 2008/6/29 Ingo Klöcker <kloecker at kde.org>:
> > On Sunday 29 June 2008, Dotan Cohen wrote:
> >> Currently, Kaddressbook stores photos in the VCF file, which makes it
> >> very bloated (300 kB without photos, over 5 MB with photos). Will
> >> KDE-PIM 4 with Akonadi suffer from this as well? Could someone
> >> enlighten me as to how photos will be stored? I know that Akonadi is
> >> a database, and I personally think that it is a bad idea to store
> >> binary data in a database. Should I file a bug requesting that the
> >> photos be stored in a folder, and that the database contain only the
> >> location of the photo?
> >
> > Akonadi includes a cache, but Akonadi is not a storage. Your contact
> > data will still be stored in a vcf file (or in whatever storage you
> > choose). Which data Akonadi stores in the cache is regulated by cache
> > policies. For a local storage (like a locally stored vcf file) it might
> > make sense not to store the photos in the cache. For a remote storage
> > (like a groupware server) this might be different because you might
> > want to have access to the photos even if you are offline.
>
> I see. I did not realize that Akonadi was a server (with a cache). I
> thought that it was a database protocol or something, I should have
> done my homework first. In this case, where I would prefer to have the
> photos outside the VCF file, I will file a wish bug as BKO.
>
> > Do you have technical reasons why you think storing photos (or other
> > binary data) in a database is a bad idea?
>
> In the little php that I do, I have seen it mentioned time and again
> on the php list not to store binary data in a database. I can ask
> there for solid reasoning if you like.

Btw, storing the larger data blobs in files is planned for a future version of 
the Akonadi server. Mainly to allow things like mmap'ed parsing on the client 
side. It's not a simple task though because outside the database you have to 
do quite some stuff manually: locking, transactions, etc.

> In the case of text VCF file, I back that file up on a regular basis.
> I prefer that it be as small as possible. Also, I would assume that
> the whole file is in RAM while Kaddressbook is open, so there's a good
> place to save a few MB of RAM, and to speed parsing of the file. Is
> this the case?

That's something Akonadi helps with. It allows partial acces to items (such as 
an email or a contact). That's currently only implemented for email to allow 
fast access to the headers needed for the folder listing without fully 
loading all mails. It could of course also be used to allow access to contact 
data without loading all images into memory. This has no effect on the actual 
storage format though.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080701/34de58dd/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list