diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-05-16 15:37:07 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-05-17 16:17:00 +0000 |
commit | ab8960b1b4e11dd166e490adb41d7bc64775172d (patch) | |
tree | ae5a1b0dae6e8a025b817d5198c4e2da853c90f9 | |
parent | b062bbb84614973fe620aace6b4f441ef8b81ad3 (diff) |
Revert "Make delegates_item_empty_jscreation & delegates_qobject comparable"
These still weren't directly comparable (as they have different count
figures), and the change has been causing significant confusion when
examining results.
At the same time, we introduce apparently regressed QObject array benchmark as
a new test so we can track improvements in that area.
This reverts commit 45da7843d6c7b70ecd37c952fd68dd84f79c23e0.
Change-Id: Id76a0a3ca1bfea2ec18a88a8ffe2cca985992142
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
3 files changed, 39 insertions, 10 deletions
diff --git a/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml b/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml index 920b4c8..89cded0 100644 --- a/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml +++ b/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml @@ -27,7 +27,7 @@ Benchmark { items = []; for (var i=0; i<root.count; ++i) { - var object = component.createObject(); + var object = component.createObject(root); items.push(object); } } diff --git a/benchmarks/auto/creation/quick/delegates_qobject.qml b/benchmarks/auto/creation/quick/delegates_qobject.qml index ee9bc3d..2bd8d52 100644 --- a/benchmarks/auto/creation/quick/delegates_qobject.qml +++ b/benchmarks/auto/creation/quick/delegates_qobject.qml @@ -2,13 +2,12 @@ import QtQuick 2.0 import QmlBench 1.0 // Test allocation of QObject, with no Repeater or anything. -// Compare with delegates_qobject & delegates_item_empty. +// Compare with delegates_qobject. Benchmark { id: root; count: 50; staticCount: 10000; - property var items; onTChanged: { allocate(); } @@ -20,15 +19,9 @@ Benchmark { } function allocate() { - if (items && items.length) { - for (var i=0; i<items.length; ++i) - items[i].destroy(); - } - items = []; - for (var i=0; i<root.count; ++i) { var object = component.createObject(); - items.push(object); + object.destroy(); } } } diff --git a/benchmarks/auto/creation/quick/delegates_qobject_large_array.qml b/benchmarks/auto/creation/quick/delegates_qobject_large_array.qml new file mode 100644 index 0000000..01fc3cf --- /dev/null +++ b/benchmarks/auto/creation/quick/delegates_qobject_large_array.qml @@ -0,0 +1,36 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Test allocation of QObject, with no Repeater or anything, stored in a JS +// array. The array is interesting as it's a large GC'd allocation. +// Compare with delegates_qobject. +Benchmark { + id: root; + count: 50; + staticCount: 10000; + + property var items; + onTChanged: { + allocate(); + } + + Component { + id: component; + QtObject { + } + } + + function allocate() { + if (items && items.length) { + for (var i=0; i<items.length; ++i) + items[i].destroy(); + } + items = []; + + for (var i=0; i<root.count; ++i) { + var object = component.createObject(); + items.push(object); + } + } +} + |