775k objects, the form is split into smaller pieces mentioned as Components to load when needed, but qml engine traverses it all completely and reserves full memory seemingly

You don't want 775k objects in memory all at the same time.

You can use the various views (ListView, GridView, ...) to dynamically load objects as needed rather than pre-loading them all. You can also use Loader and Instantiator to factor out groups of objects to be loaded only when enabled.

You can use Repeater to de-duplicate your code and reduce the overhead of processing huge amounts of it. That would initially help you here, but it would still result in lots of objects being created after it's done processing the compilation units. You may still do it for the internals of your components once you've split them into groups.

best regards,
Ulf Hermann
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to