ActivityIndicator much more CPU intensive

Bug #1431957 reported by Michał Sawicz
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Confirmed
High
Loïc Molinari

Bug Description

Given:

import QtQuick 2.3
import Ubuntu.Components 1.2

Item {
    width: childrenRect.width
    height: childrenRect.height

    Grid {
        columns: 20
        Repeater {
            model: 400

            ActivityIndicator {
                id: indicator
                running: true
            }
        }
    }

    Timer {
        interval: 10000
        running: true
        onTriggered: Qt.quit()
    }
}

Running it under xvfb with current UITK:
$ time xvfb-run -s "-screen 0 1024x1024x24" qmlscene testactivity.qml
> 20,60s user 0,44s system 205% cpu 10,225 total

When with the release before (1.1.1403+15.04.20150206-0ubuntu2¹):
> 8,42s user 0,10s system 83% cpu 10,226 total

As you can see the difference is more than double. The offending revision is 1222.1.16² that changes the ActivityIndicatorStyle's RotationAnimation to RotationAnimator, making sure that it runs on the rendering thread and is not blocked by the GUI thread.

The difference in runs outside of xvfb are minimal, in favour of the new version:

$ time qmlscene testactivity.qml
> 1,13s user 0,18s system 12% cpu 10,412 total
vs.
> 1,13s user 0,13s system 12% cpu 10,415 total

There is unfortunately some side-effect of this, the unity8 QML test suite went from taking under an hour to over two hours during our CI runs - see the attached trend chart. You can clearly see the spike at around job #563. Part of the increase is the fact that we were using the ActivityIndicator to force a render pass and cause waitForRendering() calls to return early, but the difference caused by that is about 10 minutes³, not an hour.

¹ https://launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/1.1.1403+15.04.20150206-0ubuntu2
² http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/revision/1122.1.16
³ https://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/602/

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: qtdeclarative5-ubuntu-ui-toolkit-plugin 1.2.1433+15.04.20150306-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Mar 13 17:11:18 2015
SourcePackage: ubuntu-ui-toolkit
SystemImageInfo:
 current build number: 0
 device name:
 channel: daily
 last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michał Sawicz (saviq) wrote :
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Loïc Molinari (loic.molinari)
status: New → Confirmed
importance: Undecided → High
Michał Sawicz (saviq)
summary: - ActivityIndicator much more CPU intensive under xvfb
+ ActivityIndicator much more CPU intensive
tags: added: performance
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.