Set default no. cores used for similarity checks to max. cores - 1
authorColin Clark <colin.clark@cclark.uk>
Mon, 16 Oct 2023 10:38:44 +0000 (11:38 +0100)
committerColin Clark <colin.clark@cclark.uk>
Mon, 16 Oct 2023 10:38:44 +0000 (11:38 +0100)
src/options.cc
src/preferences.cc

index a744f42..81c0c69 100644 (file)
@@ -24,6 +24,7 @@
 #include "image-overlay.h" /* OSD_SHOW_NOTHING */
 #include "layout.h"
 #include "layout-image.h"
+#include "misc.h"
 #include "rcfile.h"
 #include "ui-bookmark.h"
 #include "ui-fileops.h"
@@ -216,7 +217,7 @@ ConfOptions *init_options(ConfOptions *options)
        options->printer.image_text_position = 1;
        options->printer.page_text_position = 3;
 
-       options->threads.duplicates = -1;
+       options->threads.duplicates = get_cpu_cores() - 1;
 
        options->disabled_plugins = nullptr;
 
index 1cbbecf..808849d 100644 (file)
@@ -3922,7 +3922,7 @@ static void config_tab_advanced(GtkWidget *notebook)
        pref_line(vbox, PREF_PAD_SPACE);
        group = pref_group_new(vbox, FALSE, _("Thread pool limits"), GTK_ORIENTATION_VERTICAL);
 
-       threads_string_label = pref_label_new(group, "This option limits the number of threads (or cpu cores)\nthat Geeqie will use when running duplicate checks. The default value is 0, which means all available cores will be used.");
+       threads_string_label = pref_label_new(group, "This option limits the number of threads (or cpu cores) that Geeqie will use when running duplicate checks.\nThe value 0 means all available cores will be used.");
        gtk_label_set_line_wrap(GTK_LABEL(threads_string_label), TRUE);
 
        pref_spacer(vbox, PREF_PAD_GROUP);