Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.5.6
Description
This is a suggestion for replacing old SIGNAL-SLOT syntax with new syntax to avoid numerous allocations happen.
When a customer was analyzing their program with a heap memory profiler, they found a lot of allocations done when doing Network communication to a none responding server.
That was comming from QNetworkReplyHttpImplPrivate:postRequest and QHttpThreadDelegate::startRequest via QMetaObectPrivate::decodeMethodSignature.
This is because these functions still use the old SIGNAL-SLOT syntax. When changing them to the new syntax these numerous allocations no longer happen.
That was observed by using heatrtack on Linux platform.
The attached screenshots shows the result:
- allocations_without_patch_1.png
- allocations_without_patch_2.png
An example application (HttpRequester) and the patches from the customer are also attached.
"allocations_with_patch.png" shows the result observed after the patches applied.