-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.1
-
None
Currently, qtbase/src/gui/painting/qimagescale.cpp!multithread_pixels_function uses QGuiApplicationPrivate::qtGuiThreadPool(), which has thread pool size capped at 8 threads. When performing scaling across many images in parallel (e.g. by calling `QPixmap::scaled` from > 8 threads), throughput is constrained because the calling threads wind up deferring part of the task into the private thread pool, which causes only 8 threads to progress at once.
A workaround is completely disabling the private thread pool by setting the QT_NO_GUI_THREADPOOL environment variable before calling the scaling functions, however it would be nicer if the image manipulation functions could somehow detect this situation or allow the user to specify it, and switch over to running on the calling thread instead of the thread pool, automatically. While setting QT_NO_GUI_THREADPOOL works well for this use case, it's not immediately clear what other impacts it will have to Qt globally and what the downsides are.