[maemo-developers] Stopping QML update when not visible

From: Ville M. Vainio vivainio at gmail.com
Date: Mon May 30 18:28:52 EEST 2011
On Mon, May 30, 2011 at 6:15 PM, Andrew Flegg <andrew at bleb.org> wrote:

> BTW, list handling in QML is a pain. I suspect this list
> recreation/parsing/manipulation is accounting for a large portion of
> the CPU usage. Other thoughts from Qt Quick experts appreciated; but

Have you considered using plain javascript Arrays, instead of QML
lists? I find them better, mainly because I dislike the undocumented
and quirky behavior of most QML specific data types (immutable
QVariantMap's etc). They would probably be faster than what you are
currently doing as well.

There is no way to store javascript objects in QML components yet
(yes, I frequently complain about this in various places), but you can
accomplish the same by using this "priv" hack:

http://projects.forum.nokia.com/catbowling/browser/qml/catbowling/priv.js

http://projects.forum.nokia.com/catbowling/browser/qml/catbowling/GameScene.qml

Check out how the list "enemies" is handled in GameScene.qml
More information about the maemo-developers mailing list