[Digikam-users] Metadata

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Jul 7 14:16:22 BST 2013


> 
> What I had in mind is:
> - write metadata to database only (leave the files as they are)
> - when I'm done, tick "write meta data to file"
> - chose the option to sync the database
> - walk away from my computer

I plan to implement this one day. As discussed in this thread, it indeed 
requires a more robust storage than "keep it in memory" and problems like 
conflicts and subsequent edits must be dealt with, so it's not very easy to 
do.

Apart from that, there's the very valid question why such edit processes bring 
digikam performance down, with all the work exclusively being done in threads. 
One answer lies in the fact that everything is database-based and while Sqlite 
is very fast, writing anything to disk makes it do a hardware fsync and this 
is very very very slow and is per default necessary quite often. And it blocks 
all threads, including the main thread. For batch procedures the most 
important optimization that we have is to group writing in transactions to 
reduce the amount of fsyncs. 
Possible fixes for the generaly problem:
1) Enabling SQlite's WAL mode and reducing the "synchronous" level of SQLite. 
It did not yet dare the latter; maybe it's the key for now.
2) Accept the SQLite is not made for the heavily concurrent use that we make 
of our db and go for a db system that runs as a daemon and solves the 
synchronicity problem for us. I never tried MySQL but saw many problems with 
our backend, which lowered my motivation.

Marcel



More information about the Digikam-users mailing list