Don't cache item indexes in VisualDataModel.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Tue, 5 Jun 2012 06:33:52 +0000 (16:33 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 8 Jun 2012 01:54:10 +0000 (03:54 +0200)
commit9f9b2df76c7677fb3dc82ca617cf0732652b684d
tree1d9882d6c5625f534bdb673af2f9e5d8eea81aab
parentc98947c6011dacdde984929a9923958bae379fa3
Don't cache item indexes in VisualDataModel.

Sacrifice constant time lookup of indexes for rarely used features for
reduced memory usage.

Applications which use neither Packages, nor the VisualDataGroup api
don't ever need to query the index of an item so caching and maintaining
those indexes in unnecessary. Where they are used this add a cost
scanning for the index of an item in the cache, and in some instances
a lookup cost in the compositor.

Change-Id: I7d3c21a27a8a3c068c5ae2e1e326ff573c44d712
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickvisualadaptormodel.cpp
src/quick/items/qquickvisualdatamodel.cpp
src/quick/items/qquickvisualdatamodel_p.h
src/quick/items/qquickvisualdatamodel_p_p.h