diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-17 11:37:17 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-17 11:37:17 +1000 |
commit | 69a17a912a41458a2b4a20bdbda1717920275250 (patch) | |
tree | f0eb0cdb210765ddb954539a0fbe520640eae2a1 /src/declarative/qml/qdeclarativecontext.cpp | |
parent | 9c5e112e12f09ad5c8356d6815f9b23102e99bfd (diff) |
Evaluate all shared bindings together using a shared context
The vast majority of bindings are capable of being shared (that is, don't
introduce closures themselves) and consequently this improves the
performance of almost every app.
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecontext.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index c2c21d30fb..caa3b0c7d8 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -48,6 +48,7 @@ #include "qdeclarativeengine.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativev4bindings_p.h" +#include "private/qv8bindings_p.h" #include <qscriptengine.h> #include <QtCore/qvarlengtharray.h> @@ -499,16 +500,16 @@ QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListProperty<QObject QDeclarativeContextData::QDeclarativeContextData() : parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), isPragmaLibraryContext(false), publicContext(0), propertyNames(0), contextObject(0), imports(0), childContexts(0), nextChild(0), prevChild(0), - expressions(0), contextObjects(0), contextGuards(0), idValues(0), idValueCount(0), optimizedBindings(0), - linkedContext(0), componentAttached(0) + expressions(0), contextObjects(0), contextGuards(0), idValues(0), idValueCount(0), linkedContext(0), + componentAttached(0), v4bindings(0), v8bindings(0) { } QDeclarativeContextData::QDeclarativeContextData(QDeclarativeContext *ctxt) : parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), isPragmaLibraryContext(false), publicContext(ctxt), propertyNames(0), contextObject(0), imports(0), childContexts(0), nextChild(0), prevChild(0), - expressions(0), contextObjects(0), contextGuards(0), idValues(0), idValueCount(0), optimizedBindings(0), - linkedContext(0), componentAttached(0) + expressions(0), contextObjects(0), contextGuards(0), idValues(0), idValueCount(0), linkedContext(0), + componentAttached(0), v4bindings(0), v8bindings(0) { } @@ -607,8 +608,11 @@ void QDeclarativeContextData::destroy() if (imports) imports->release(); - if (optimizedBindings) - optimizedBindings->release(); + if (v4bindings) + v4bindings->release(); + + if (v8bindings) + v8bindings->release(); for (int ii = 0; ii < importedScripts.count(); ++ii) { qPersistentDispose(importedScripts[ii]); |