[Development] performance of signal slots across threads

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Mar 3 13:01:44 CET 2014


On Thu, Feb 27, 2014 at 4:47 PM, Nguyen Huu Minh <
HuuMinh.Nguyen at vandewiele.com> wrote:

> Hi,
>
> Thank you for your reply. I will try to make a benchmark, in the meanwhile
> I will try to explain my situation more clearly.
>
> My first object basically handles TCP communication to a (simulated)
> hardware device. There are many types of messages, but one of them is data
> request.
> That object then emits a signal, which is connected to the other Object
> will serves the data.
>

For the TCP communication you need not have a separate thread as the
QTcpServer has async APIs. Though for the 'data' object you _might_ need to
do it in a different thread depending on whether the 'data acquisition'
process is blocking or not.

I have used such a setup in an embedded Linux environment with a very good
performance gains for our UI (we were decoding JPG images coming over the
network in a separate thread, while image download was done in the main
thread). You might be experiencing an implementation issue. As others have
pointed out, a compilable example that shows this problem would help (and
profiling too).

HTH,
-mandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140303/5b7c5481/attachment.html>


More information about the Development mailing list