Bug 188925

Summary: Write image metadata in background with user feedback
Product: [Applications] digikam Reporter: Sherwood Botsford <sgbotsford>
Component: ProgressManager-BatchAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: axel.krebs, caulier.gilles, marcel.wiesweg
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.3.0
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 283013    

Description Sherwood Botsford 2009-04-05 23:46:40 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Fedora RPMs

I selected 2000 images, then applied a tag.

I then could do nothing else while digikam updated the images.

Expected behaviour:

Image metadata is handled by a background process, and the program remains
ready to serve user.

Implementing ideas:
* Database is updated immediately.  Database has flags indicating that images are not in sync.
* Changes in metadata are also written to a journal file.
* Updater program is started.  It starts reading journal entries, writing them to the files, and clearing the journal entries.

If updater runs as a separate process then it can finish after digikam closes.

For the duration of the updater process, the affected pictures are flagged as not being in sync.  If user edits a picture, then updater skips the data for that pic, coming back later.

If program halts, then journal is left un-run.  Updater is started on next start of digikam.

Would this work?
Comment 1 Marcel Wiesweg 2009-04-11 17:20:00 UTC
I have been thinking to moving this process out of the main thread as well, but going for an easier approach. Digikam can just do this in a separate thread and almost refuse to close if it is still working when the user closes it. Putting flags in the database is a solution that requires a lot of work and overhead.
Comment 2 Marcel Wiesweg 2009-07-05 18:19:37 UTC
Progress update:
For all such actions originated from the main icon view, a thread is used.
Sidebars still use the old method and will do this probably until they are ported to model/view (post 1.0).
Check at shutdown is TODO.
Comment 3 caulier.gilles 2011-12-16 16:18:50 UTC
Marcel,

What's new about this file ?

Gilles Caulier
Comment 4 caulier.gilles 2011-12-16 16:22:41 UTC
*** Bug 266684 has been marked as a duplicate of this bug. ***
Comment 5 caulier.gilles 2013-11-21 22:21:01 UTC
Marcel, 

with all improvements done with ProgressManager and Maintenance tool, this report can be considerate as solved, i think...

Sherwood,

Do you tried to use last digiKam 3.5.0 ?

Gilles Caulier
Comment 6 caulier.gilles 2014-08-28 15:44:20 UTC
Maintenance tool as since a while a Matadata Synchronizer which can be used in background an support multithreading and multicore CPU with a feedback given through Progress Manager.

Gilles Caulier