What is the overhead of using SLProtocolExt instead of SLProtocol? Since SLProtocolExt is superset of SLProtocol, object of type ConcreteSLProtocolExt is naturally larger then ConcreteSLProtocol. How big of an performance impact is this and what are the cases where this overhead needs to be considered?
Once decision is made to use SLProtocolExt instead of SLProtocol, does number of QActions that use SLProtocolExt matter, or does every QAction use the same instance of ConcreteSLProtocolExt, which gets instantiated on the call to the first QAction that needs it? More generally does new ConcreteSLProtocol object get instantiated for every call to QAction?
Hi Edib. As Laurens already mentioned, there could be a small performance impact when using SLProtocolExt, because some objects are being allocated. However the impact is probably very small and will almost never be a problem in practice. Personally I prefer more readable code over such micro-optimizations. When performance becomes a problem there are most likely other things that can be improved that will have a much bigger impact. I always use SLProtocolExt, and as far as I'm aware it has never caused problems.