diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-04 03:18:37 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-04 03:34:52 (GMT) |
commit | 588093b3e12dd5039bcc4ee545d9d9112d25394f (patch) | |
tree | 2f401dd36f44004fb06cead7846965dad3b5738e /tests/benchmarks/declarative | |
parent | dbda9ae7996d090cda296074fc02842f1dd2e0f7 (diff) | |
download | Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.zip Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.gz Qt-588093b3e12dd5039bcc4ee545d9d9112d25394f.tar.bz2 |
Improve performance by separating id and context properties
Diffstat (limited to 'tests/benchmarks/declarative')
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/object_id.txt | 6 | ||||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/benchmarks/declarative/qmlcomponent/object_id.txt b/tests/benchmarks/declarative/qmlcomponent/object_id.txt new file mode 100644 index 0000000..526b6ad --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/object_id.txt @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + id: Blah +} + diff --git a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp index f032004..f0e029d 100644 --- a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp +++ b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp @@ -56,6 +56,7 @@ void tst_qmlcomponent::creation_data() QTest::addColumn<QString>("file"); QTest::newRow("Object") << "object.txt"; + QTest::newRow("Object - Id") << "object_id.txt"; QTest::newRow("MyQmlObject") << "myqmlobject.txt"; QTest::newRow("MyQmlObject: basic binding") << "myqmlobject_binding.txt"; QTest::newRow("Synthesized properties") << "synthesized_properties.txt"; @@ -70,6 +71,9 @@ void tst_qmlcomponent::creation() QmlComponent c(&engine, file); QVERIFY(c.isReady()); + QObject *obj = c.create(); + delete obj; + QBENCHMARK { QObject *obj = c.create(); delete obj; |