Speed up object creation with lots of id name objects
authorSimon Hausmann <simon.hausmann@theqtcompany.com>
Fri, 10 Apr 2015 12:56:24 +0000 (14:56 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Thu, 16 Apr 2015 17:14:15 +0000 (17:14 +0000)
commit496ddbfd1fe27bdddf5c15cd0ea70df452a3ec04
tree779aece69688317cf41c2e5757a7d8684054cc52
parentd22db9e458828d403110fa0b9de1ca0c831d7e96
Speed up object creation with lots of id name objects

In the common case when objects are referenced by id, we don't need the
QQmlContextData's property name cache for the lookup. Instead of bindings
we resolve the id to an integer at type compilation time. Therefore we can
delay the population of the QQmlContextData's propertyNames until we need it
and therefore safe time on startup.

Change-Id: I2e8eeb51b1ac92f230059be3467f9a1e00fdbbef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlcontext.cpp
src/qml/qml/qqmlcontext_p.h
src/qml/qml/qqmlcontextwrapper.cpp