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

Applications requires several seconds to become responsive depending on the number of items in scene

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      I'm investigating a problem were all my apps take some time to become responsive. The more complex the app is, the more time it takes to get responsive to touch.

      I've parted from a simple Qt Quick application to demonstrate this issue. The attached example is nothing more than a ColumnLayout with a Repeater inside.

      When the number of items is bigger then a certain number, the application takes several seconds to become responsive. The increase in the number of items seems to cause an exponential increase in time to become responsive.

      These are some of the tested model sizes and respective results:

       

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Layouts 1.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          ColumnLayout {
              anchors.fill: parent
              spacing: 1
      
              Repeater {
                  //model: 10    // ok
                  //model: 100   // ok
                  //model: 1000  // ok
                  //model: 10000 // ok
                  //model: 12500 // ok
                  //model: 25000 // more than 5 seconds to become responsive
                  //model: 50000 // more than 20 seconds to become responsive
                  model: 100000  // 1.5 minutes to become responsive
                  delegate: Rectangle {
                      Layout.fillWidth: true
                      Layout.preferredHeight: 1
                      color: "black"
                  }
              }
          }
      
          Rectangle {
              anchors.fill: parent
              color: "transparent"
              opacity: 0.5
      
              MouseArea {
                  anchors.fill: parent
                  onPressed: parent.color = "gray"
                  onReleased: parent.color = "transparent"
              }
          }
      }
      

      Note 1: This does not happen in Android, Windows or Mac platforms. 

      Note 2: It is important to refer that this didn't happen in previous versions of Qt. I can't recall exactly when this started to happen on iOS

      Note 3: While it is not a show stopper, some users have been complaining of inability to  interact with our apps in the first couple of seconds, which is definitely bad for reputation.

      Attachments

        1. basic-test.zip
          2 kB
        2. main_timings.qml
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            sinosoidal Nuno Santos
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes