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

QML Profiler shows double amount of Repeater delegate Create calls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.6, 5.11.1
    • None
    • macOS 10.13.5
      Windows 10 (1803) - the example hangs on Windows though, but still can be profiled
    • macOS, Windows

    Description

      When profiling an application which uses QML Repeater, all Repeater delegate Create calls have double the amount of actual repeater model size.

      In simple example, completedCount has value 100000, while profiler shows 200000 Create calls.

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtQuick.Controls 1.4
      import QtQuick.Layouts 1.3
      
      Window {
          id: root
          visible: true
          width: 640
          height: 480
          title: "Completed components: " + completedCount
          property int completedCount: 0
      
          ColumnLayout {
              anchors.fill: parent
              Repeater {
                  model: 100000
                  delegate: Rectangle {
                      width: 100
                      height: 5
                      color: "black"
      
                      Component.onCompleted: {
                          ++root.completedCount;
                      }
                  }
              }
          }
      }

       

      Attachments

        1. Profiler.png
          78 kB
          Pavol Markovic
        2. Repeater.zip
          3 kB
          Pavol Markovic
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            pavol.markovic Pavol Markovic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes