Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 6.5 => Qt 6.10: QML application power consumption increased crazily
Forum Updated to NodeBB v4.3 + New Features

Qt 6.5 => Qt 6.10: QML application power consumption increased crazily

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 132 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • notify_ctrlN Offline
    notify_ctrlN Offline
    notify_ctrl
    wrote last edited by notify_ctrl
    #1

    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.

    1 Reply Last reply
    1
    • notify_ctrlN Offline
      notify_ctrlN Offline
      notify_ctrl
      wrote last edited by
      #2

      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: visible and everything fixed.

      1 Reply Last reply
      1
      • notify_ctrlN notify_ctrl has marked this topic as solved
      • jeremy_kJ Offline
        jeremy_kJ Offline
        jeremy_k
        wrote last edited by
        #3

        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.visible appears 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 running to root.busy appears to be sufficient and more concise.

        Asking a question about code? http://eel.is/iso-c++/testcase/

        notify_ctrlN 2 Replies Last reply
        0
        • jeremy_kJ jeremy_k

          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.visible appears 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 running to root.busy appears to be sufficient and more concise.

          notify_ctrlN Offline
          notify_ctrlN Offline
          notify_ctrl
          wrote last edited by
          #4

          @jeremy_k This problem (or bug) can't be reproduced by Basic style. 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.qml or QSG_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 BusyIndicator is not visible. I tested this on Linux with Qt 6.10.

          1 Reply Last reply
          0
          • jeremy_kJ jeremy_k

            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.visible appears 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 running to root.busy appears to be sufficient and more concise.

            notify_ctrlN Offline
            notify_ctrlN Offline
            notify_ctrl
            wrote last edited by
            #5

            @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 running to root.busy appears to be sufficient and more concise.

            Yes this is totally true. I'll change my code later. Thanks for your suggestion!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved