Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Improve performance of image loading in QML on dual core embedded systems
Forum Updated to NodeBB v4.3 + New Features

Improve performance of image loading in QML on dual core embedded systems

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yuvalt
    wrote on last edited by
    #1

    Hi,

    I was testing QML performance on a dual-core embedded system. I created a grid with 200 items and showed 21 items in the grid. I noticed that while I scroll, the performance wasn't so good. After doing a lot of digging and comparison I got to some conclusion which is a bit odd: during scroll, core 0 is running at 100%. That's fine. The low priority thread that loads the images was running on core 1. This means that the fact that it has a lower priority is meaningless as core 1 was mostly idle so the scheduler was actually letting it run. Every time it finished decoding an image, it copied it to the main thread, which caused a hick-up. I disabled core 1 and scroll performance was MUCH better and images were decoded only when I was not scrolling.

    I think a good idea would be to set the affinity of these two threads to the same CPU. That's a temporary fix. I think that a better fix would be that the image loader, would not immediatelly return the job upon complete, but wait for a good time (when no animations are running for example) to copy the images to the main thread. Anyone has other ideas?

    Give it a try if you are facing the same issue. If you want to disable a core on linux do the following:

    echo 0 > /sys/devices/system/cpu/cpu1/online

    -Yuval

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      A very interesting and important discovery. Thanks!

      I think you should consider posting this to "QML mailing list":http://lists.qt-project.org/mailman/listinfo. I assume you are talking about Qt4? Have you tried this with Qt5/ scenegraph?

      (Z(:^

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yuvalt
        wrote on last edited by
        #3

        Yeah, it's qt4. I'm trying to get qt5 working with eglfs.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved