Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Interacting with UI increases loop time in a separate worker thread
Forum Updated to NodeBB v4.3 + New Features

Interacting with UI increases loop time in a separate worker thread

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 181 Views 3 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.
  • T Offline
    T Offline
    triasirax
    wrote on last edited by
    #1

    I'm working on a project using 2 high-speed (50.000 FPS) cameras and a QML interface. I have separate threads for each camera. On those threads I'm running simple infinite loops and process the frames as they come. Most of the time my program can keep up with the incoming 50k frames per second, keeping loop time around 20 microseconds. But around every 30 to 40 seconds I'm losing some frames, my loop time increases up to 25 microseconds.

    After some messing around with the program I noticed that interacting with the UI, dragging one of it's corners very fast, for example, causes my loop time to increase up to 60 microseconds, even though I'm using just an empty application windows that has nothing in it and my worker threads are not sending/receiving any signals from the UI thread.

    I know cpu has to switch threads but resizing an empty windows on a separate, independent thread can have this much affect on performance? Also I'm working with basler cameras if anyone's familiar, they have a program for configuring the cameras called PylonViewer. With this program I can view a live stream from cameras and regardless of how much I resize the UI, I don't lose any frames. I wonder how did they achieve that despite having a pretty complicated UI, especially compared to my empty window. And what can I do to improve performance of my program?

    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