babl: search depth of 2 and 4, instead of 2 and 5
authorØyvind Kolås <pippin@gimp.org>
Sat, 23 May 2020 16:53:36 +0000 (18:53 +0200)
committerØyvind Kolås <pippin@gimp.org>
Sat, 23 May 2020 16:57:53 +0000 (18:57 +0200)
Conversions needed for color management in GIMP are not feasible in 2
steps, searching 5 deep for commonly used conversions causes severe UI
stalls, lowering the max search depth to 4 avoids this regression
introduced in 51437f216dbbef80f9bf661dd152452083119349, while keeping
the speed-up for other cases.

babl/babl-fish-path.c

index 7a55d4449e7a7b10b7c9d763d51c3ac52e8a1c06..ab436168365c4ae13d2d953cc04de42b23e45452 100644 (file)
@@ -603,10 +603,10 @@ babl_fish_path2 (const Babl *source,
 
     get_conversion_path (&pc, (Babl *) source, 0, max_path_length (), tolerance);
 
-    /* attempt with path length + 3 */
+    /* attempt with path length + 2 */
     if (babl->fish_path.conversion_list->count == 0)
     {
-      int max_length = max_path_length () + 3;
+      int max_length = max_path_length () + 2;
       if  (max_length > BABL_HARD_MAX_PATH_LENGTH)
         max_length = BABL_HARD_MAX_PATH_LENGTH;