CPU load too high with Qt 5.2.1 and Qt 5.3.0-beta - unusable with ARM Cortex A8?



  • Hardware: TI AM335x (ARM Cortex A8 @ 500MHz, GPU: PVR SGX530 @ 200MHz), 128MB DDR2 RAM
    OS: embedded Linux (kernel: 3.2.0), Buildroot filesystem
    Platform: EGLFS

    When porting our QML application from Qt 4.8.0 (Qt Quick 1.0) to Qt 5.2.1 (Qt Quick 2.2) we have encountered performance issues on our target platform.

    The CPU load is very high, nearly 100% even if there is nothing or little to (re)paint.
    Thus the application does not render simple animations smoothly and fails to sufficiently respond to user touch input. Drag and Drop gestures are nearly impossible thereby.

    We didn't see all these problems with Qt 4.8.0 (Qt Quick 1.0) on the same hardware!

    Any suggestions? Is it a known issue - we didn't find concrete statements?

    UPDATE:
    Here is the QML file of a small example to illustrate the problem:

    @import QtQuick 2.2

    Rectangle {
    color: "white"
    width: 320
    height: 480
    Grid {
    x: 10
    y: 10
    columnSpacing: 10
    rowSpacing: 10
    columns: 3
    Repeater {
    model: 12
    Rectangle {
    id: rect
    width: 90
    height: 90
    color: "dodgerblue"
    smooth: true
    antialiasing: true
    Text {
    text: qsTr("Icon")
    anchors.centerIn: parent
    }
    SequentialAnimation on rotation {
    id: rotate
    NumberAnimation { to: 2; duration: 60 }
    NumberAnimation { to: -2; duration: 120 }
    NumberAnimation { to: 0; duration: 60 }
    loops: Animation.Infinite
    alwaysRunToEnd: true
    running: false
    }
    Component.onCompleted: rotate.start();
    }
    }
    }
    }@

    Running this application on the target causes a CPU load of 65% (and VSZ% of 75%) on the target mentioned above! And this is much too high in our opinion!

    This example is also very interessting as it possibly shows a bug of the new Qt version:
    The SequentialAnimation does not look as it should - the icons do not rotate smoothly but vibrate snatchy!

    UPDATE 2:
    Also tested with Qt 5.3.0-beta. Results are nearly the same (although there seems to be a slight performance improvement), see my replies below.


  • Moderators

    Hi,

    I'm wondering if your issue is related to "this bug":https://bugreports.qt-project.org/browse/QTBUG-36709 ? Try installing "Qt 5.3.0 beta":http://download.qt-project.org/development_releases/qt/5.3/5.3.0-beta/ -- if the problem still persists, open a new bug report



  • Ok, we will try it with Qt 5.3.0 beta and I will post an update then!



  • Finally, today we were able to spend some time on that issue. And here are the results with Qt 5.3.0-beta:
    The application now causes a CPU load of 15% (and 83% VSZ%) on the target. Better, but still not good enough in our opinion! Because a real application still fails to do smooth drag and drop gestures (with or without animations the CPU load then rises up to 99%)...

    So, at the moment we are very confused about what the original problem really is?! Thus we cannot open a bug report for now. We are also surprised that no one else has similar problems?!



  • Two bugs reported:
    "Animation not smoothly with Qt Quick 2.2":https://bugreports.qt-project.org/browse/QTBUG-38523
    "Performance issues with QML MouseArea events":https://bugreports.qt-project.org/browse/QTBUG-38527


  • Moderators

    Try with native text rendering, it can do miracles to performance ;)



  • Hi,
    just tested it with renderType: Text.NativeRendering but it did not improve the performance - CPU load is still the same, look & feel also!



  • I have the same problem. I try to rotate png image with NumberAnimation and it's load my CPU (i5 2500k) for 25%. There is no such problem with Qt Quick 1.1

    I solved my problem by switch-off vsync

    The problem still exists on the netbook (CPU intel atom N450).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.