Qt 6.5 => Qt 6.10: QML application power consumption increased crazily
-
My app is made with Qt 6.5, and uses QML as GUI script.
Recently after upgrading Qt to 6.10.0, mobile users complain that power usage of my app has highly increased, that causes their phones heat up and experience FPS drop (because CPU is overheated and reduces its frequency). Finally it lead to low frame rate and high battery usage.
Some users shows me that my app uses 100% GPU all of the time. But when using Qt 6.5 everything is fine (animations are very smooth and low battery usage), so this is very confusing for me!
I didn't modify any line of QML code, just upgraded the version of Qt library, so I want to know possible reasons of this issue.
You can read my source code here (my app is open-source): https://github.com/Qsgs-Fans/FreeKill
Thanks for any help or suggestion.
-
I think I found the reason of my problem.
BusyIndicator { id: busyIndicator running: true anchors.centerIn: parent visible: root.busy === true }In older version of QT, when this busyIndicator is invisible, it's just ignored so the whole scene will not redrew every frame. However in Qt 6.10 thing changed.
Maybe this is a bug of QT? Changes it to
running: visibleand everything fixed. -
N notify_ctrl has marked this topic as solved
-
No comment (well, limited. I thought the scene graph was reasonably good about pruning invisible redraws) on whether this is a a bug or not, but the use of
BusyIndicator.visibleappears to be unnecessary.https://doc.qt.io/qt-6/qml-qtquick-controls-busyindicator.html#running-prop:
Note: The indicator is only visible when this property is set to true.
Binding
runningtoroot.busyappears to be sufficient and more concise. -
No comment (well, limited. I thought the scene graph was reasonably good about pruning invisible redraws) on whether this is a a bug or not, but the use of
BusyIndicator.visibleappears to be unnecessary.https://doc.qt.io/qt-6/qml-qtquick-controls-busyindicator.html#running-prop:
Note: The indicator is only visible when this property is set to true.
Binding
runningtoroot.busyappears to be sufficient and more concise.@jeremy_k This problem (or bug) can't be reproduced by
Basicstyle. To reproduce it, use Material style (which is default on Android devices so only phone users complain about it)Minimal: (run with
mangohud qml6 main.qmlorQSG_RENDER_TIMING=1 qml6 main.qml)import QtQuick import QtQuick.Controls.Material Rectangle { BusyIndicator { anchors.centerIn: parent visible: false } }You will see 60fps even the
BusyIndicatoris not visible. I tested this on Linux with Qt 6.10. -
No comment (well, limited. I thought the scene graph was reasonably good about pruning invisible redraws) on whether this is a a bug or not, but the use of
BusyIndicator.visibleappears to be unnecessary.https://doc.qt.io/qt-6/qml-qtquick-controls-busyindicator.html#running-prop:
Note: The indicator is only visible when this property is set to true.
Binding
runningtoroot.busyappears to be sufficient and more concise.@jeremy_k said in Qt 6.5 => Qt 6.10: QML application power consumption increased crazily:
https://doc.qt.io/qt-6/qml-qtquick-controls-busyindicator.html#running-prop:
Note: The indicator is only visible when this property is set to true.
Binding
runningtoroot.busyappears to be sufficient and more concise.Yes this is totally true. I'll change my code later. Thanks for your suggestion!