From ffe4ecfc037cfb2f9b7d700f9887034a080f8848 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 9 Aug 2025 20:02:55 -0400 Subject: [PATCH] don't thread for modest numbers of image tiles --- coders/ashlar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coders/ashlar.c b/coders/ashlar.c index 8d2b638f22..9124cb61e3 100644 --- a/coders/ashlar.c +++ b/coders/ashlar.c @@ -53,13 +53,14 @@ #include "MagickCore/list.h" #include "MagickCore/magick.h" #include "MagickCore/memory_.h" +#include "MagickCore/module.h" #include "MagickCore/option.h" #include "MagickCore/property.h" #include "MagickCore/quantum-private.h" #include "MagickCore/static.h" #include "MagickCore/string_.h" #include "MagickCore/string-private.h" -#include "MagickCore/module.h" +#include "MagickCore/thread-private.h" #include "MagickCore/utility.h" #include "MagickCore/xwindow.h" #include "MagickCore/xwindow-private.h" @@ -625,7 +626,8 @@ static Image *ASHLARImage(ImageInfo *image_info,Image *image, extent.width=0; extent.height=0; #if defined(MAGICKCORE_OPENMP_SUPPORT) - #pragma omp parallel for schedule(dynamic) shared(status,extent) + #pragma omp parallel for schedule(dynamic) shared(status,extent) \ + magick_number_threads(image,image,n,1) #endif for (i=0; i < n; i++) {