[Qt-interest] Signal/Slot model peformance

Bo Thorsen bo at thorsen-consulting.dk
Mon Aug 23 10:12:04 CEST 2010


Den 23-08-2010 09:21, Valeriy Portnyagin skrev:
> Hello all,
>
> Did anybody measure the performance of Signal/Slot architecture?
> I mean, in instance, comparing performance between virtual function call
> and work of Qt signal-slot.
> What is it faster?
> And may be using Signal/Slot model is bad for application performance.

If you call the slot directly, it's just a function call.

However, if you call the slot by a signal-slot connection, it's *a lot* 
slower. If you do something performance intensive, don't even think 
about this. Call the method directly.

But for a normal application, all the GUI work is never performance 
critical. For anything involving user feedback, it's not going to be the 
signal-slot connection that's a problem.

Bo Thorsen.



More information about the Qt-interest-old mailing list