Skip to content

Commit b312aa3

Browse files
jenshannoschwalmTurboGit
authored andcommitted
Increase worker threads
1. As we delegate more things to background jobs we should increase the number of worker threads for sufficient systems. 2. 8GB systems are accepted as sufficient 3. Simplify test for backthumbs crawler and accept 8GB systems this way
1 parent 79bd641 commit b312aa3

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/common/darktable.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,8 +1736,7 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
17361736

17371737
darktable.backthumbs.running = FALSE;
17381738
darktable.backthumbs.capable =
1739-
dt_get_num_procs() >= 4
1740-
&& darktable.dtresources.total_memory / 1024lu / 1024lu >= 8000
1739+
dt_worker_threads() > 4
17411740
&& !(dbfilename_from_command && !strcmp(dbfilename_from_command, ":memory:"));
17421741
if(init_gui)
17431742
{
@@ -2089,9 +2088,7 @@ void dt_show_times_f(const dt_times_t *start,
20892088

20902089
int dt_worker_threads()
20912090
{
2092-
const int threads = dt_get_num_threads();
2093-
const int gbytes = (int)(_get_total_memory() / (1lu << 20));
2094-
const int wthreads = (gbytes >= 8 && threads >= 4) ? 6 : 3;
2091+
const int wthreads = (_get_total_memory() >> 19) >= 15 && dt_get_num_threads() >= 4 ? 7 : 4;
20952092
dt_print(DT_DEBUG_DEV, "[dt_worker_threads] using %i worker threads\n", wthreads);
20962093
return wthreads;
20972094
}

0 commit comments

Comments
 (0)