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/qquickshadereffectsource.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/qquickshadereffectsource.cpp')
-rw-r--r-- | src/quick/items/qquickshadereffectsource.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp index 4861c9e62a..80be283443 100644 --- a/src/quick/items/qquickshadereffectsource.cpp +++ b/src/quick/items/qquickshadereffectsource.cpp @@ -192,7 +192,6 @@ QQuickShaderEffectSource::QQuickShaderEffectSource(QQuickItem *parent) , m_grab(true) { setFlag(ItemHasContents); - connect(this, SIGNAL(sceneGraphInvalidated()), this, SLOT(invalidateSG())); } QQuickShaderEffectSource::~QQuickShaderEffectSource() @@ -677,7 +676,7 @@ QSGNode *QQuickShaderEffectSource::updatePaintNode(QSGNode *oldNode, UpdatePaint return node; } -void QQuickShaderEffectSource::invalidateSG() +void QQuickShaderEffectSource::invalidateSceneGraph() { if (m_texture) delete m_texture; |