Scrolling Marquee Performance Issue
-
wrote 27 days ago last edited by
I am trying to implement a scrolling text marquee using QML. I have multiple implementations (one using a NumberAnimation on a Text element, another using an animated Flickable). Both work great if a single instance of the application is running, with the animations having no issues running at 60FPS. However I would like to have two versions of it running, one on each monitor. When this happens the animation begins to stutter.
This happens with multiple backends (eglfs, X11, and Wayland). In the eglfs case one application is running, with two QQuickView's, one for each monitor. The backend application is the bare minimum needed to load the qml and run it.
The stuttering can also be reproduced with two instances of the app running on a single monitor.
The CPU utilization when the programs are running is < 15%. Debug prints from Qt seem to indicate that OpenGL is being detected by the scenegraph code.
The target hardware is a Raspberry Pi 4, although I have run it on a Raspberry Pi 5 with similar results.
Does anyone have any insight as to where the bottleneck may be?
Can anyone recommend an alternate scrolling method that may perform better?Thanks for the help.
-
wrote 24 days ago last edited by
Hi @SmoothOne,
I have encountered similar performance challenges when implementing scrolling marquees in QML, on resource-constrained devices like the Raspberry Pi 4 and 5.
- Optimize Animation Techniques:
While NumberAnimation and Flickable are common choices for creating scrolling effects. consider ShaderEffect for offloading some of the rendering to the GPU, which can lead to smoother animations.
- Profile App:
Utilize Qt's built-in profiling tools to identify bottlenecks. can help determine if the issue stems from the QML layer, the rendering pipeline or elsewhere. it can provide insights into CPU and GPU usage & helping you pinpoint areas for optimization.
- Simplify Scene Graph:
Avoid nesting multiple layers of elements unnecessarily & make sure that only visible elements are being rendered.
- Hardware:
Make sure OpenGL or Vulkan is being utilized effectively for rendering
Good Luck..
1/2