Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Huge CPU-load with QML AnimatedImage .gif

Huge CPU-load with QML AnimatedImage .gif

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.9k Views
  • 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.
  • L Offline
    L Offline
    louis
    wrote on last edited by
    #1

    Hi,

    i traced down a huge CPU usage on my (embdedded) Linux based System. using eglfs the listView is invisible. Qt 5.1.1 QtQuick 2.0

    usage:

            ListView
            {
              id: commandsView
              anchors.fill: parent
              clip: true
              boundsBehavior: Flickable.StopAtBounds
              delegate: ProgressDelegate {}
            }
    

    in delegate:

      AnimatedImage
      {
        id: busyAnimation
        anchors.leftMargin: 8
        anchors.left: parent.left
        anchors.verticalCenter: parent.verticalCenter
        source: "/images/bg_Busy.gif"     // from http://loadinggif.com/
        visible: false
      }
    

    Could the Problem be that the delegate does not know the length of the listView generating thousands of AnimatedImage?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I can't really comment on the CPU-load however 5.1.1 is rather old now, can you check again with Qt 5.5.1 or even 5.6 RC ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        louis
        wrote on last edited by louis
        #3

        I'll try.

        In fact, i just Need to outcomment the source: "/images/bg_Busy.gif " and everything is fine.

        EDIT:
        tried adding the property:
        playing: visible

        this works fine.
        I would suggest to make this the Default value. :P

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you mean that if it's invisible and you start playing the gif it burns down the CPU ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Offline
            L Offline
            louis
            wrote on last edited by
            #5

            I set the playing property to visible (which is false). However if it is visible, CPU is still running high (20% instead of 0.4%)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You should test against a more recent version of Qt, there's been optimization done in between. Current is 5.6 RC

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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