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

Performance issue with many rows in TableView

    XMLWordPrintable

Details

    • All

    Description

      I encountered a performance issue with large data tables using a TableView in Qml and a C++ Model providing the data. If the TableView is completely scrolled down to the bottom and the model is updated via the beginResetModel() and endResetModel() methods, it takes multiple seconds for the TableView to restore the view. If the scroll position is at the top, the view updates immediately.

      I added a print in a delegate item and it seems that every item delegate is created once, from top to bottom, instead of just updating the items that are in the current view.

      The TableView docs mentions to set contentWidth and contentHeight to avoid unnecessary calculations and updates, but it seems not to help in my case.

      I managed to reproduce it completely in a Qml example. I just defined one colum and 100,000 rows, scrolled down the view and a button triggers the model switch. It takes 3-4 seconds on my machine.

      Is this a known TableView limitation? If so, do you know a workaround for this?

      Attachments

        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
            voodoo66 Voodoo Master
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes