While working on a medium-sized Qt project, we noticed that memory consumption is surprisingly high when there is not much going on on the screen. My attempts to find some kind of memleak led me to the CREATE_QML_OBJECT macro, where qml instance objects are created. After removing all user ui elements from the downloaded qml file and leaving only four main ones, I got
Rectangle { Button {} CheckBox {} Slider {} TextField {} }
And this thing consumes about ~ 1-1.5 MB.
I looked at QtQuick demos and there:
Demo version of the gallery . Just a bunch of controls, 100 MB at startup.
The same game demo . A simple game, after 5 minutes of playing 256 MB, is gone.
What really surprises me is the fact that a simple QtQuick QML application can consume a huge amount of memory. Does anyone know what causes this distribution, and is there a way to manage it?
Any help would be greatly appreciated.
Related links, did not find an answer there
QML large memory consumption?
QML application memory size
Performance Suggestions and Suggestions
qml qt-quick
vim
source share