You are passing your QJsonObject instance by value: sendData( QJsonObject o ). In C++, this requires making a copy of the data. If you pass by reference instead: sendData( QJsonObject & o ) or sendData( const QJsonObject & o ) if the object will not be modified during the call, then you avoid copying.If I now copy the payload needlessly to many threads (all but one discard the message), I create an unnecessary overhead.
And as Lesiok asks, if you are in control of the connections, then why are you making connections to receivers who ignore the signal?
Bookmarks