[maemo-developers] Stopping QML update when not visible

From: Andrew Flegg andrew at bleb.org
Date: Mon May 30 18:15:17 EEST 2011
On Mon, May 30, 2011 at 16:07, Ville M. Vainio <vivainio at gmail.com> wrote:
>
> Right - so I confirmed Andrew's fear [was unnecessary] that QML would
> be "stupid" about this, and waking up the process when it should be
> steady (e.g. by doing a dummy op at 60fps).

Thanks.

> If you have animations that proceed when the application should be
> steady, you have a broken design in the first place; this is a problem
> that application developer can easily solve.

Indeed, and by hooking up Thomas' code to my
"CalibratedAccelerometer", it now drops to 0% when the window isn't
active:

    http://gitorious.org/attitude/attitude/blobs/master/qml/attitude/CalibratedAccelerometer.qml

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
the graphical performance is orders of magnitude higher than the
Python/Gdk implemention.

Cheers,

Andrew

-- 
Andrew Flegg -- mailto:andrew at bleb.org  |  http://www.bleb.org/
More information about the maemo-developers mailing list