2013/9/2 johannes hanika <hana...@gmail.com>:
> yes, that should be fine. at least if the xmp is written while holding a
> lock on the dt_image_t struct (dt_image_cache_write_release() writes the xmp
> if called with the right flag). explicitly calling dt_exif_xmp_write does
> not lock anything and will probably sooner or later corrupt your data.

Not sure if this is a goal to be pursued after looking a bit at the code.

In fact currently the changing of the keywords is done with a single
SQL command for
all selected images:

   INSERT OR REPLACE INTO tagged_images SELECT imgid, <tagid> FROM
selected_images;

Doing that one file at a time into a background job means:

- having N (instead of 1) SQL command
- creating N lock (instead of 0)
- writing the xmp (as before N write call)
- releasing the N lock (instead of 0)

So at the end I fear a big impact on performance. Even if this is done
in background it will eat
quite a bit of extra CPU cycles.

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to