Many people hint that QObject is heavy, but without any clarity as to how hard it is. Therefore, I made some measurements, not very accurate, all values ββare approximate.
- unused QObject ~ 160 bytes
- one automatic connection without arguments ~ 235 bytes
- 2 auto join without arguments ~ 315 bytes
- 3 auto join, 1 with 3 arguments ~ 400 bytes
- 2 auto-joins, 1 in the queue with 3 arguments ~ 432 bytes
These numbers should take into account that I am using the 64-bit Qt assembly.
So in conclusion, the QObject overhead is pretty significant. Nothing should be sneezed or abused.
dtech
source share