Huge CPU-load with QML AnimatedImage .gif



  • 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?


  • Lifetime Qt Champion

    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 ?



  • 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


  • Lifetime Qt Champion

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



  • 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%)


  • Lifetime Qt Champion

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.