[Interest] QtQuick high CPU load

dusek.martin at email.cz dusek.martin at email.cz
Tue Jul 12 11:17:18 CEST 2016


I have high CPU load issue on a test PC. Projects are attached.

1) Animation - text rotation:

import QtQuick 2.7

import QtQuick.Window 2.2

import QtQuick.Layouts 1.2

Window {

    visible: true

    width: 640

    height: 480

    title: qsTr("Hello World")

    ColumnLayout {

        anchors.fill: parent

        Text {

            text: qsTr("Hello World")

            color: "black"

            Layout.preferredHeight: parent.height * 0.2

            Layout.alignment: Qt.AlignCenter

            NumberAnimation on rotation {

                from: 0

                to: 360

                duration: 4000

                loops: Animation.Infinite





causes whole CPU core to be consumed.

2) Updating position of QML element from C++ causes whole CPU to be 
consumed, when the update period is 16 ms or less. When the update period is
17 ms and more, then there is almost no CPU load.

The program is a class, where QML element is created dynamically, then 
periodic QTimer is started. On every QTimer timeout x and y of QML element 
is changed.

The system is:

Qt 5.7.0 mingw prebuilt binaries (also tried with 5.6.1 mingw prebuilt 
Windows 7 Ultimate SP1

Intel Core i5-4670K CPU 3.40 GHz
DirectX 9.0c - December 2005, 11.0, shader model: vs_5_0, ps_5_0
OpenGL 4.2

Is there anything I can do with this issue? Tested on 3 other PCs (even low 
cost notebooks) and they are able to run both applications almost with no 
CPU load.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160712/f4e4db3f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Projects.zip
Type: application/zip
Size: 8863 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160712/f4e4db3f/attachment.zip>

More information about the Interest mailing list