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

[Regression] Decreased performance in timerEvent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.3, 6.8.0 Beta2, 6.9.0 FF
    • 6.7.1, 6.8.0 Beta1
    • Core: Event loop
    • None
    • Windows 11 Pro
      MSVC 2019
    • Windows
    • b039d2251 (dev), eb208a6bb (6.8), 19afb7722 (6.7)

    Description

      The performance of `timerEvent` has noticeably degraded in Qt versions 6.7.1 and 6.8.0-beta1 compared to Qt 6.6.1.

      This issue becomes evident when building and running the attached timertest.zip .

       

      The difference in behavior appears to be introduced by the following commit:

      https://codereview.qt-project.org/c/qt/qtbase/+/367377

       

      Steps to reproduce:

      1. Build and execute timertest.zip using Qt 6.6.1.
      2. Build and execute timertest.zip using Qt 6.7.1 or Qt 6.8.0-beta1.
      3. Observe the responsiveness degradation in the latter versions.

       

      The patch 0002_qtbase_add_log.patchhighlights the accumulation of Timer events in the event queue.

      e.g.

      18:59:21.014 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 17)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 22
      18:59:22.724 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 18)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 22
      18:59:24.536 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 19)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 24
      18:59:26.455 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 20)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 24
      18:59:28.467 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 21)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 26
      18:59:30.588 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 22)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 26
      18:59:32.801 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 23)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 28
      18:59:35.119 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 24)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 28
      18:59:37.538 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 25)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 30
      18:59:40.053 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 26)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 30
      18:59:42.672 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 27)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 32
      18:59:45.391 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 28)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 32
      18:59:48.209 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 29)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 34
      18:59:51.128 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 30)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)) 34
      18:59:54.151 I (25736)[14936] (unknown:0) : QMap((QEvent::Timer, 31)(QEvent::MetaCall, 1)(QEvent::DeferredDelete, 1)(QEvent::LayoutRequest, 2)(QEvent::UpdateRequest, 1)) 36
      ... 

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            ayamamoto Atsushi Yamamoto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes