Unsolved Performance issue in Qt5.6.3 based GUI
-
Hi,
I am working on Qt GUI using qml based on Qt 5..6.3 running on iMX6 Solo X custom embedded platform. I have used c++ in backend.
I observed that GUI performance is sluggish when i scrolls the screen or when i use slider for backlight control (backlight gets updated and slider gets updated later after 2 seconds )
I have used loader to load the qmls as per user request.
I have attached scrollbar to Listview which displays the list.- Does replacing the Listview with repeaters+column+flickable will improve the GUI performance..?
- Is there any way to render the GUI faster...?
Please help me to improve the GUI performance...?
-
My first guess would be that the model is too big (many columns, many rows) or that the rendering process is too complicated (maybe big images, smoothing etc) for this platform to handle in realtime.
I don't know if that embedded platform can swap but if it was Linux or Windows it could ran out of RAM.
For the rendering process look at QML properties like antialiasing, scale, smooth, clip etc.
-
Hi,
Thanks for the reply.A] I already replaced all background images with background colors for most of the items, only using symbols/icons images if needed.
Also as suggested, i set following properties for all items in qml:-
- anti-aliasing :- false
- clip : false
- Positioning of items using anchors (w.r.t parent) instead of x,y,width/height
- smooth: false
Now qml takes less time to load,but while scrolling the list (50 elements), it is still sluggish.
How to improve the scrolling of list faster...?
B] Also In another qml, i am using ColorAnimation to change color values (flashing effect) . I observed color transitions takes place slowly (even with duration set to 100ms or less) and screen become less responsive when animation runs and cpu utilization shoots to more than 98% (luckily it does get hanged or crashed)
i tried replacing ColorAnimation with opacityAnimator (as per https://doc.qt.io/qt-5/qml-qtquick-opacityanimator.html , it runs in render thread instead of GUI thread).
Is there any way to run animation in qml in another thread to improve performance...?
-
have you tried to place your delegate of that ListView into Loaders and only set those active that are actually on display?
I noticed increased performance when I did that in one of my applications
Is there any way to run animation in qml in another thread to improve performance
Not that I'm aware of, but I may be wrong, can you show us your actual implementation of this an animation?
-
Hi,
-
How to use loader to load delegate and set only displayed elements active.....could you please give example or more info..?
-
Animation implementation in qml :-
Rectangle { id:rect width: 452 height: 54 color: "#b9261c" OpacityAnimator { id:flash_header target: rect from: 0 to: 1 duration:300 loops: Animator.Infinite; } } onSignalReceived : { flash_header.start() }
-
-
Hi Padlock/J.Hilk,
I tried loading delegate using loader, but no much improvement in scrolling performance.Any suggestions on using OpacityAnimator/ colorAnimation performance...?
When animation starts on screen(only animation runs, other components are already loaded from qml), cpu utilization increases to 98%. Also scrolling and animation runs slowly.