Why is Darktable editing not real-time? (What would need to be done?)

@pk5dark Thank you! My Windows machine was indeed using an integrated Intel graphics card that I didn’t know I had.
I’ve not figured out the exact details, yet, but at least some operations are now much faster on the Windows machine.


I just compiled a version of Darktable without the little preview window in the top left. And it is indeed about twice as fast in all GUI operations.

(Add a return; immediately after entering dt_dev_process_preview_job in src/develop/develop.c. This was surprisingly easy to figure out.)

Still not as fast as Capture One, but getting there. Most operations now take less than 200 ms.

Well, simply disabling the preview does come with a few downsides, such as no longer seeing a blurry picture when zooming, before the sharp render shows up. Not really a long-term solution.

But as it turns out, there was already an option in the code for using a smaller preview. It had a few bugs, though, if you actually enabled it. I fixed those bugs, and here are the performance numbers:

And now:

  • Linux/OpenCL Default: 0.150 s

A bit more than twice as fast as before. (Although some 30% or so were gained by compiling on my own machine, either because the current git version is faster than 3.0.0, or because local compilation sped it up.)

It used to be that the preview took about as long as the image. Now the preview takes a tiny fraction of the time, leaving the image to finish much faster.

I’ll open an issue on Github and see if I accidentally broke something here, or if that’s actually useful for someone.

4 Likes

I’m running Windows 10 and the lag for the tonecurve (same code as basecurve I think) is near
enough to real time. I’m not running OpenCL and my CPU is a 6 core i7 that is a few years old.

Recently there has been a lot of discussion and work on github of UI speed-ups… so maybe I just got lucky and picked off versions that had benefited. I’ve just built a fresh version tonight and it seems fine…

Try with the following settings in ~/.config/darktable/darktablerc

opencl_async_pixelpipe=true
opencl_device_priority=*/!0,*/*/*
opencl_mandatory_timeout=250
opencl_scheduling_profile=very fast GPU

The “very fast GPU” seems to contradict my performance timings above. The other options don’t seem to make a difference (on my Linux machine).

What are these settings supposed to do? Was this advice intended for the Windows issue or as a general performance advice?

First of all determine, which device is our faster gpu. Then set the opencl_device_priority to prioritize the faster gpu e.g. opencl_device_priority=1,*/… and opencl_scheduling_profile=default.
I found (at least on my mac) the other options doesn’t respect the prioritizing
Btw: there’re plenty of opencl infos in the usermanual: “OpenCL scheduling profile” in the darktable usermanual

I am currently having a real slow down ….running on windows…may try to format a drive and install Linux. In darkroom hitting the spacebar to advance takes around 7 seconds for the image to display….seems
to be recalculating something each time….happens if I advance and then even if I go right back still slow…even with only a couple of modules….I have deleted my database and library but still the issue persists…I know there are a lot of changes to the database
and history stack so maybe it’s a side effect…