Qt QML running slow



  • Hi,

    I am using olimex board with linux os. I have created qt qml desktop application using qt 5.3.2. My application needs to update qml gui on every 100 ms but it takes 2-3 secs to update it as well as when Button is clicked it takes 4-5 sec to change the color of button or change the image. Overall working of qml UI is too slow . How can make it more fast? Is there any way to do this?

    Regards


  • Moderators

    Make sure you are running hardware-accelerated OpenGL. From your description I presume your app is running on Mesa drivers (where all OpenGL is computed by main CPU instead of the GPU). Also, try using EGLFS (just in case you run on xcb platform plugin).

    Lastly, if only possible, upgrade your Qt version. Between 5.3 and 5.9 there have been a ton of big performance optimisations in Qt.



  • Hi Sierdzio,

    It does not look like running on hardware accelerated openGL, what are the other options to make this qml faster?

    Regards


  • Moderators

    • Avoid Javascript as much as possible
    • Do as much as possible in C++
    • Reduce the number of QtQuick items used
    • Set visible to false for all elements that aren't used at the moment
    • Update from QtQuick controls 1 to version 2
    • Don't use clipping
    • Don't use transparency


  • Hi Wieland ,

    I am using C++ as much as possible and also removed unnecessary QtQuick items.
    I need to use transparency for few items.
    My QtQuick version is 2. Still it is running slow

    Regards


  • Moderators

    @Anny said in Qt qml running slow:

    My QtQuick version is 2

    The import part is to use Qt Quick Controls version 2 that was introduced with Qt 5.6, see Qt Quick Controls 2.0 – a new beginning! for an introduction. BTW: What Olimex board is that exactly?



  • my QtQuick verison is 2 and QTQuick controls version is 1 , I will try to update quick controls to version 2 .

    @Wieland said in Qt qml running slow:

    What Olimex board is that exactly?

    olimex a20lime2 is a development board.



  • @sierdzio you were right it was because of hardware acceleration was not activated. Since I have activated hardware acceleration this issue is solved .

    Thank you


  • Moderators

    Great, it's good to hear that. Happy coding!


Log in to reply
 

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