Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.2, 6.5.1, 6.6.0
-
None
Description
Qt applications have a lot of CPU usage on macOS and iOS when playing simple animations.
Consider this demo app:
import QtQuick Window { width: 640 height: 480 visible: true title: qsTr("Animation test") Rectangle { width: 100 height: 100 anchors.centerIn: parent color: "red" visible: true PropertyAnimation on rotation { from: 0 to: 360 duration: 1000 loops: Animation.Infinite running: true } } }
Gets about 10%+ CPU usage on macOS and 20%+ when running in iOS simulator. More complex apps have even more CPU load until it becomes too much and UI starts lagging.
I would expect something this simple to have <1% usage instead. This is the case on other platforms (tested Windows desktop and Android).
Note: the CPU usage goes away if the animation is not running, or if the application window is not visible (eg. behind other windows). It does not go away if the Rectangle is set to visible: false however.