Skip to content
  • QTimer is very inaccurate

    Unsolved Qt for MCUs
    31
    0 Votes
    31 Posts
    4k Views
    P

    @jsulm, @JonB
    Hello Both,

    I found the reason for high CPU load.

    Background:
    We have our own devices and I'm working on creating user Interfaces on the display of our device. We have many qml files to create some objects which needs to displayed on the device.

    We have a Software Tool which draws the objects on the PC using qml Files as per the user settings(like the size, position of the object on the display etc..). Then the objects are downloaded into our device.

    Root cause for High Cpu Load, Inaccuracy of QTimer:
    As a part of the objects that are created and downloaded from PC to the device, there is a ".gif(AnimatedImage)" object also.
    We are setting the "playing" property of this qml object to "true". So, this object is causing high CPU load even though the page in which this object is present is made invisible(i.e "visible" property is changed to false). This is the reason also for the inaccuracy of the QTimer as AnimatedImage is consuming lot of CPU time and Qtimer is not triggered at the right time.

    When I binded the "playing" property of "AnimatedImage" object with its "visible" property, the cpu load is very much reduced(from around 100% to around 15%). Only when I open the page which has "AnimatedImage" object, the cpu load is increasing back to around 100%.

    Questions:

    Any idea why "AnimatedImage" is causing such a high cpu load. Any CPU intensive operations are done by QT which are specific to AnimatedImages? The "cache" property of the "AnimatedImage" is false in high CPU load scenario. But if I change "cache" to true and open the page with "AnimatedImage", cpu usage is around 35%( but it was more than 100% when "cache" is false). How "cache" property is affecting the cpu usage of "AnimatedImage"?

    Thanks in Advance.

  • 0 Votes
    1 Posts
    245 Views
    No one has replied
  • Filtring TreeView QML

    Unsolved QML and Qt Quick
    8
    0 Votes
    8 Posts
    947 Views
    E

    @SGaist thanks a lots for your reply, bu how to do it?