From 0de680c8e8fab36e386dca35e5008ffaa27e8ef6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 2 Sep 2014 11:49:50 +0200 Subject: Fix performance regression caused by SG signals in QQuickItem. For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll --- src/quick/items/qquickframebufferobject.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/quick/items/qquickframebufferobject.cpp') diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp index 7c70f2730f..da1709f055 100644 --- a/src/quick/items/qquickframebufferobject.cpp +++ b/src/quick/items/qquickframebufferobject.cpp @@ -108,7 +108,6 @@ QQuickFramebufferObject::QQuickFramebufferObject(QQuickItem *parent) : QQuickItem(*new QQuickFramebufferObjectPrivate, parent) { setFlag(ItemHasContents); - connect(this, SIGNAL(sceneGraphInvalidated()), this, SLOT(invalidateSG())); } /*! @@ -308,7 +307,7 @@ void QQuickFramebufferObject::releaseResources() d->node = 0; } -void QQuickFramebufferObject::invalidateSG() +void QQuickFramebufferObject::invalidateSceneGraph() { Q_D(QQuickFramebufferObject); d->node = 0; -- cgit v1.2.3