qtdeclarative/src
Milian Wolff 84f61dd2d2 Fix performance issues when handling layout changed in Quick item views.
When the layout changes, we mark all rows as changed but do not track
where the individual rows get moved.

The only reason why one would want to track the moves is to persist
the current item selection across a layout change. But even the previous
code did not achieve that. I'll create a follow up patch to this one
that also implements this behavior as seen in Qt Widget item views.

Note that removing this code brings a tremendous performance win
on larger models. The repeated calls to _q_itemsMoved triggered O(n^2)
behavior in the number of top items in the model. Even with "only"
tens of thousands of items in the model, a layout change became very
costly and took seconds on a beefy modern desktop machine.

Calling _q_itemsMoved in a loop is bad because it:

- leads to O(N^2) behavior within QQmlChangeSet when merging the small
  moves into the item view's current change set
- potentially triggers tons of binding/property updates when the cached
  model indices are updated in _q_itemsMoved

Removing this slow path, I did not yet find a behavior change to the
previous code. Instead, it just does it all much faster.

Change-Id: I67fa99a1c5d8e05d17497d29391da9458bd9bdd0
Task-number: QTBUG-51638
Reviewed-by: Daniel Vrátil <daniel.vratil@kdab.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-04-26 08:42:44 +00:00
..
3rdparty/masm Remove dummy implementation for Pass*Ptr operator=(). 2016-04-04 07:53:07 +00:00
imports Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-04-08 11:16:24 +00:00
particles Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-08 13:03:25 +02:00
plugins QmlDebug: Adapt to renaming of Qt Creators "QML/JS" console 2016-04-22 07:52:56 +00:00
qml Fix performance issues when handling layout changed in Quick item views. 2016-04-26 08:42:44 +00:00
qmldebug QmlDebug: Support sending multiple messages per packet 2016-03-11 09:18:58 +00:00
qmldevtools
qmltest Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-08 13:03:25 +02:00
quick QQuickTextInput: Listen for changes to cursorFlashTime 2016-04-21 13:15:18 +00:00
quickwidgets Add a note saying that QQuickWidget::rootObject can return null 2016-04-04 07:49:48 +00:00
src.pro