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

QtConcurrent::run - initialization time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.0.0
    • Core: QtConcurrent
    • None
    • Windows 7 Enterprise (64 bit)
      VS2010SP1 SDK (32 bit) / QtCreator

    Description

      By using QtConcurrent::run the first time in an application, it seems to take about 1 second to load up.
      Once this is loaded, it does almost immediately respond, which leads me to the conclusion that you are initializing a lot on the first call.

      This can cause UI applications to freeze if they use QtConcurrent::run for simple task threading in their UI. For me, it forced me to do a "fake call" for QtConcurrent::run in the constructor, so I can use it lateron in my program without freezing the UI.

      If there is no better performance to get in QtConcurrent::run, at least give us a clean initialization function in the namespace for our constructor, avoiding the unclean fake calls.

      A small main.cpp is attached, which should show the difference between the first and the 2nd call - at least here it does:
      First run: 1092
      Second run: 0

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            stiat Georg Grabler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes