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

QProcess::start introduces a 50ms delay in UI thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.9.5
    • Core: Other
    • None
    • Ubuntu 14.04
    • Linux/X11

    Description

      Each call to QProcess::start introduces an approximately 50ms halt of the UI thread. Launching multiple QProcess::start calls in quick succession introduces large delays that pile up and make the UI momentarily unresponsive.

      Looking at events with the eventFilter, I see the 50ms delay generally associated with a QProcess_ChildAdded event (or something else preventing event loop processing of the subsequent event). 

      If I move the QProcess and their invocation calls to a worker thread, the delay is still present in the UI thread, except now the delay is not associated with the QProcess_ChildAdded event, it is associated with whatever event is coincidentally happening during that time, indicating that the delay is happening somewhere outside of the event loop.

      Is a 50-60ms overhead in QProcess calls expected? Is the fact that that overhead isn't hideable in a worker thread also expected? Is there any workaround? In our application, even a single 50ms pre-emption of the UI thread is not acceptable

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            scott.merritt Scott Merritt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes