Does darktable-generate-cache create thumbnails only for new images, or should I find out the last image id and pass it as a parameter?
My point is that it’s running at this moment and creating thumbnails for my whole collection (~44K) and I’m planning to run it again every time I import new images, but I don’t want to spend unnecessary computer resources on it (for 44K images, it takes a looong time…)
I think darktable is fairly efficent at managing the image cache, no? If you import your shots, its generating the cache as fast as it can, and is only generating for new files… I’d guess that’s the best way, no?
Unfortunately this does not answer the question. @gadolf asked for the usage of darktable-generate-cache. The manual for this tool is inconsistent at this point :
… program to generate all missing thumbnails in the background when your computer is idle …
but a few lines later one can read for the parameters –min-imgid , --max-imgid
… If no range is given, darktable-generate-cache will process all images from the entire collection …
I posed this question myself. Which statement is correct. Possibly a developer can give us an indication?
@gadolf, I had a look into the source code of darktable-generate-cache. You find it at darktable/src/generate-cache/main.c at master · darktable-org/darktable · GitHub (lines 106 - 112)
// if the thumbnail is already on disc - do nothing if(!access(filename, R_OK)) continue; // else, generate thumbnail and store in mipmap cache. dt_mipmap_buffer_t buf; dt_mipmap_cache_get(darktable.mipmap_cache, &buf, imgid, k, DT_MIPMAP_BLOCKING, 'r'); dt_mipmap_cache_release(darktable.mipmap_cache, &buf);
It should generate only missing thumbnails.
Good news, thank you, @pehar!
@paperdigits, I should have made clearer that I was not complaining about darktable cache generation efficiency, just stating a fact: it would take a long time. Besides, I should also have added that I am using very old hardware (i3 entry-level laptop, the only goodie being 12 GB ram) and creating max res thumbnails (-m 7). Because of that, I just wanted to make sure next time I use the generate cache script I wouldn’t be doing it all again - it took me 48 hours to create the thumbnails