From b8b4613800abfe1bc8861011c7152d6d242414e1 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 1 Apr 2010 15:59:59 +1000 Subject: Optimization: Minor object allocation speedup --- src/declarative/qml/qdeclarativevme.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index 6498e6c..0bdc4d5 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -255,7 +255,13 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, ddata->columnNumber = instr.createSimple.column; QObjectPrivate::get(o)->declarativeData = ddata; - ctxt->addObject(o); + + ddata->nextContextObject = ctxt->contextObjects; + if (ddata->nextContextObject) + ddata->nextContextObject->prevContextObject = &ddata->nextContextObject; + ddata->prevContextObject = &ctxt->contextObjects; + ctxt->contextObjects = ddata; + QObject *parent = stack.top(); QDeclarative_setParent_noEvent(o, parent); -- cgit v0.12