Signal slots across threads performance
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?
(I am using Windows Xp embedded and Lubuntu 13.10).
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.
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.
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