ActivityIndicator takes 30% of CPU in Nexus4

Bug #1164919 reported by Albert Astals Cid
2
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Invalid
High
Loïc Molinari

Bug Description

Running this

$ cat foo.qml
import QtQuick 2.0
import Ubuntu.Components 0.1

ActivityIndicator {
    height: 50
    width: height
    running: true
}

$ qmlscene foo.qml --resize-to-root

in a Nexus4 makes top report values like
20% CPU for qmlscene
10% CPU for surfaceflinger

The values seem a bit too high

It also seems this values can easily go up if there is anything else next to the ActivityIndicator that needs rendering, for example the following patch to the shell

=== modified file 'Hud/SearchBar.qml'
--- Hud/SearchBar.qml 2013-02-18 15:38:25 +0000
+++ Hud/SearchBar.qml 2013-04-05 09:42:34 +0000
@@ -39,7 +39,7 @@
         width: height
         x: magnifierImage.x
         y: magnifierImage.y
- running: visible
+ running: true
     }

     TextField {

Makes it idle at 35% CPU usage while without the patch it has no CPU usage at all

Changed in ubuntu-ui-toolkit:
assignee: nobody → Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit:
importance: Undecided → Critical
status: New → Confirmed
Changed in ubuntu-ui-toolkit:
assignee: Zoltan Balogh (bzoltan) → Loïc Molinari (loic.molinari)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
Loïc Molinari (loic.molinari) wrote :

ActivityIndicator simply animates the rotation property of an Image item, animating any other properties on any other items has the same cost, as well as animating slightly more than one item. it seems like this CPU usage for qmlscene is simply the cost of having the QtQuick rendering loop running. On my Ubuntu desktop it's 5% for qmlscene and 10% for compiz. I agree it's a bit high.

Revision history for this message
Florian Boucault (fboucault) wrote :

It might be that the 30% reported is 30% of one of the 4 cores the Nexus 4 has. When all 4 cores are busy it might be that the value reported by top for that same operation would be 30/4.

Revision history for this message
Loïc Molinari (loic.molinari) wrote :

Yes, by default top reports CPU usage in what they called the Irix mode (for 4 cores CPU percentage is not divided by 4 and thus displays percentage over 400) as opposed to the Solaris mode (for 4 cores CPU percentage is divided by 4 and thus displays percentage over 100).

Revision history for this message
Loïc Molinari (loic.molinari) wrote :

press 'I' to switch between Irix/Solaris.

Changed in ubuntu-ui-toolkit:
importance: Critical → High
Revision history for this message
Tim Peeters (tpeeters) wrote :
Revision history for this message
Loïc Molinari (loic.molinari) wrote :

This is simply the cost of the QtQuick rendering engine. That might have been improved when we switched to the batched renderer with Qt 5.2.

Changed in ubuntu-ui-toolkit:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.