Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117923

ItemParticle causes constant CPU usage and rerenders

XMLWordPrintable

    • Linux/X11
    • c6fad0e79 (dev), 3fbca326e (6.7), cd64942d4 (6.6), 7504bdbde (tqtc/lts-6.5)

      The following example causes constant CPU usage while it should be doing nothing:

       

      import QtQuick
      import QtQuick.Particles
      
      Item {
          id: effectRoot
      
          ParticleSystem {
              id: particleSystem
              paused: true
              running: false
          }
          Emitter {
              id: rainfallEmitter
              group: "rain"
              width: effectRoot.width
              enabled: false
              anchors.horizontalCenter: effectRoot.horizontalCenter
              system: particleSystem
              ItemParticle {
                  system: particleSystem
                  groups: ["rain"]
                  fade: false
                  delegate: Rectangle {
                      width: 2
                      height: 30
                      radius: 2
                      color: "#0099ff"
                  }
              }
          }
      }

       

      This is because the QQuickItemParticle (in contrast to the ImageParticle) has no logic to pause, when the particle system is paused. This causes both the updatePaintNode to constantly schedule new updates as well as the Clock (QTickAnimationProxy) constantly scheduling new ticks.

      The expected behaviour would be for the ItemParticle to properly pause, when the particle system and the Emitters are stopped to reduce CPU usage when not actually rendering anything.

        For Gerrit Dashboard: QTBUG-117923
        # Subject Branch Project Status CR V

            sadegh Sadegh Taghavi
            deepbluev7 Nicolas Werner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes