[Interest] Qt signal overhead (same thread, direct connection)
André Somers
andre at familiesomers.nl
Mon Apr 25 07:53:54 CEST 2016
Op 22/04/2016 om 18:47 schreef Ben Lau:
>
>
> As long as the passed data is an implicit sharing class like
> QByteArray, then it will be fine. Because only a pointer to the
> contained data is passed. Data copying only happen when a function
> write to an implicit sharing class.
>
That might not be as cheap as you think it is. The refcounting is done
in a thread-save way, and that costs time. For not smallish contents, it
may be quite a bit cheaper to just copy the data itself.
André
More information about the Interest
mailing list