diff options
author | Alan Alpert <aalpert@rim.com> | 2012-12-08 18:54:35 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-11 17:53:33 (GMT) |
commit | ad601ceb3b953c042c70b462605f87c84b7179a6 (patch) | |
tree | 61b55a93383e448b3f44fbe8c351674f198ba146 /src/declarative/qml | |
parent | 691e78e5061d4cbc0de212d23b06c5dffddf2098 (diff) | |
download | Qt-ad601ceb3b953c042c70b462605f87c84b7179a6.zip Qt-ad601ceb3b953c042c70b462605f87c84b7179a6.tar.gz Qt-ad601ceb3b953c042c70b462605f87c84b7179a6.tar.bz2 |
Specify better increment for captured properties
There aren't that many captured properties, decreasing the
increment will give better performance.
Change-Id: Iddb17c695eda5513f2d038123f4c886e559d8f6b
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeexpression.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeexpression_p.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index cc1d552..4f22b94 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -157,7 +157,7 @@ public: int notifyIndex; }; bool captureProperties; - QPODVector<CapturedProperty> capturedProperties; + QPODVector<CapturedProperty, 16> capturedProperties; QDeclarativeContext *rootContext; bool isDebugging; diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp index 2d2aeb4..5e36d6e 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/declarative/qml/qdeclarativeexpression.cpp @@ -463,7 +463,7 @@ QScriptValue QDeclarativeQtScriptExpression::scriptValue(QObject *secondaryScope QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context()->engine); bool lastCaptureProperties = ep->captureProperties; - QPODVector<QDeclarativeEnginePrivate::CapturedProperty> lastCapturedProperties; + QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> lastCapturedProperties; ep->captureProperties = trackChange; ep->capturedProperties.copyAndClear(lastCapturedProperties); @@ -542,7 +542,7 @@ QScriptValue QDeclarativeQtScriptExpression::eval(QObject *secondaryScope, bool } } -void QDeclarativeQtScriptExpression::updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties) +void QDeclarativeQtScriptExpression::updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> &properties) { Q_ASSERT(guardObject); Q_ASSERT(guardObjectNotifyIndex != -1); diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h index 6e8df8a..402ae84 100644 --- a/src/declarative/qml/qdeclarativeexpression_p.h +++ b/src/declarative/qml/qdeclarativeexpression_p.h @@ -153,7 +153,7 @@ public: private: void clearGuards(); QScriptValue eval(QObject *secondaryScope, bool *isUndefined); - void updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty> &properties); + void updateGuards(const QPODVector<QDeclarativeEnginePrivate::CapturedProperty, 16> &properties); bool trackChange; |