Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.4.2
-
37c25c6e7 (dev), 8fae0aa4a (6.5)
Description
I'm seeing some cases where a QML ListView will create delegate instances for every single entry in its model, regardless of visibility. For models with a large number of entries, this degrades performance to the point of being completely unresponsive. I would expect the ListView to only create delegate instances for the items that are currently visible or in the cacheBuffer area. A minimal example is attached, which can demonstrate the bug using the qml preview tool.
I had wondered if this was related to the binding I'm using for the delegate height, since setting a fixed height prevents this behavior. However, setting a non-zero spacing or topMargin on the ListView will prevent the bug, even if the delegate height has the same binding as before. In addition, the bug only seems to occur when using a Window as the top-level control.