Activating a derived class QObjecton the heap in C ++ gives me about 160 bytes per object.
Registering the same object using qmlRegisterType()to create from QML and dynamically creating an object using createObject()gives me a little over 2000 bytes per object.
In contrast, a size difference of almost 13 times the memory per object is used when creating from QML. Please note that the object has no bindings or anything extra compared to how it is in C ++.
Naturally, when used QObject, it means that it is an invisible object. Thus, it should not have any additional overhead in relation to rendering the scenario chart.
Please note that I performed tests with a significant number of objects several times, getting consistent results and increasing proportionally, so it is unlikely that this is due to some dispersion or memory variance of the QML module.
Why is this happening? This is normal? Is there any way to reduce it?
dtech source
share