darktable speed (in general, and when using two monitors)

I considered @aadm’s speedup suggestion and wondered if it was at least partially related to nuking the darktable’s configs.

As it would take several days for me to reimport all of my photos, I really didn’t want to wipe out my database and start over.

I’m very happy to report, at least in my case, I found a few major speedups that helped me immensely (most likely in order of speed wins):

  • Back up your current library, then defrag and compact the database with vacuum (mine went from 201 MiB to 177 MiB):

    cp library.db library-`date -I`.db
    sqlite3 library.db 'VACUUM;'
    
  • Move darktable configs out of the way (while darktable isn’t running) and let darktable create new ones by running it again afterward (this moves it to a file with the current date, in ISO format):

    mv darktablerc darktablerc-`date -I`
    

    Having darktable recreate your configuration file means that you’ll lose a few settings. One of the most important ones are which modules are turned on and favorited. You can grep through your old configuration file and copy/paste the lines into your new darktablerc. (First make sure darktable is not running, of course.)

    Here’s a one-liner that will do this for you:

    grep -i -P "plugin.*(favorite|visible)=true" darktablerc-`date -I` >> darktablerc
    

    (If you want to also preserve the disabled modules too, just remove the true part of the command above.)

    Pretty much everything else is a preference. You can compare the files and copy over the parts you want or just toggle it in the UI after starting darktable again.

  • Be selective of Lua plugins you choose to enable.

    • In my case, I had image_path_in_ui turned on, and it seems to be extremely slow — probably even checking the database and file on every hover in lighttable mode. This was what made darktable almost unbearably slow when going through photos.
    • Instead, I found that there’s a relatively newly updated OpenInExplorer plugin which not just works on Windows, but also on Linux (with Nautilus). As I wanted the path for the image to open it up in Nautilus anyway, this new one was a huge performance boost (as it only runs when I want it to) and even made my life a little better too. :wink:

Happy photo editing, everyone!

2 Likes