Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140117

Allow configuring qimagescale multithread_pixels_function threadpool usage

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.1
    • Image formats
    • 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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            allan.jensen Allan Sandfeld Jensen
            shuffle2 shuffle2
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes