Important: Please read the Qt Code of Conduct -

QQuickItem breaks batching

  • Hi,

    I'm working on a project at work and I've recently begun using the QSG_VISUALIZE environment variables to see how well our batching numbers are. Unfortunately the number of batches was very high for one of the pages. We have a QQuickItem on that page, along with other qml items, and when I comment out the updatePaintNode() method the batching number goes way down from around 200 to 10!

    We have quite a few child nodes that get appended to the main node in the updatePaintNode() method. Is there anything we can do or is this just the nature of QQuickItem?


  • The aim of improving rendering efficiency is to reduce batching count. However for example if you overlay one item upon the other, it breaks batching, resulting in increasing batching count. So in 2D rendering it is advised to prevent overlay.

  • Thanks for the reply. Is there a way I can set the background of the QQuickItem to a fully opaque colour? I'd like to try it to see if it helps at all. I tried wrapping it inside an opaque Rectangle but that didn't work.
    At the moment the QQuickItem itself basically draws a grid on top of the parent item, but it doesn't fill its own background in.

Log in to reply