Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Signal slots across threads performance

Signal slots across threads performance

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.2k Views
  • 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.
  • V Offline
    V Offline
    vdw_hmng
    wrote on last edited by
    #1

    Hi,

    I am developing a cross-platform system (Windows and Ubuntu) that needs signal and slot communication between two QObjects living in different threads.
    When both QObjects live in the same thread, the performance difference between Windows and Ubuntu is negligible, but when I move one the QObjects to another thread I notice the performance on Ubuntu is markedly slower.
    I understand that using signal/slots has some overhead cost, what I don't understand is why there seems to be much more overhead on Ubuntu than on Windows?

    Can anyone give me some pointers as to what the problem is or how I can work around it?

    Thanks!

    (I am using Windows Xp embedded and Lubuntu 13.10).

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wlinaz
      wrote on last edited by
      #2

      Not a lot to go on here.
      Take a peek at Qt::QueuedConnection vs Qt::DirectConnection
      when setting up the signal/slot calls to the thread.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vdw_hmng
        wrote on last edited by
        #3

        I am using a queued connection because I don't want the caller to perform the necessary computations in the caller's thread. What is puzzling me is not the speed decrease per se, but the difference between Windows and Linux.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          Since your question implies some lower level implementation, I would advise you to bring it to the "interest":http://lists.qt-project.org/mailman/listinfo/interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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