From aceeaa1dcbce8b1fbd869eb64a1f59b928d59e4e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 24 Aug 2009 11:07:43 +0200 Subject: Speedup the qgraphicsscene benchmark let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list --- tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp index 7a5caa4..172f7d4 100644 --- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp @@ -166,6 +166,8 @@ void tst_QGraphicsScene::addItem() } scene.itemAt(0, 0); } + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); } void tst_QGraphicsScene::itemAt_data() @@ -220,6 +222,9 @@ void tst_QGraphicsScene::itemAt() QBENCHMARK { scene.itemAt(0, 0); } + + //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list + qApp->processEvents(); } QTEST_MAIN(tst_QGraphicsScene) -- cgit v0.12