diff options
author | Gunnar Sletta <gunnar@sletta.org> | 2014-09-02 11:49:50 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2014-09-03 09:16:14 +0200 |
commit | 0de680c8e8fab36e386dca35e5008ffaa27e8ef6 (patch) | |
tree | 36ef99752bd8f255d89d9a6f3635655dd857e94e /src/quick/items/qquickframebufferobject.cpp | |
parent | 978ecab8b5dc20384cb449e05d58293f96722c0e (diff) |
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/items/qquickframebufferobject.cpp')
-rw-r--r-- | src/quick/items/qquickframebufferobject.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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; |