ActivityIndicator takes 30% of CPU in Nexus4
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 |
Changed in ubuntu-ui-toolkit: | |
importance: | Critical → High |
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.