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

On Mon, Sep 11, 2023 at 10:24 AM Ulf Hermann via Interest <
interest@qt-project.org> wrote:

> > In essence: when a form has a large amount of subforms and Components,
> > then, in the internals of qml engine, it is parsed and every piece of it
> > is assigned totalObjectCount which is accumulated recursively for big
> > forms. Then, in qjsengine sources this happens:
> >
> > sharedState->allJavaScriptObjects =
> > scope.alloc(compilationUnit->totalObjectCount());
>
> This form has got to be extremely unwieldy. May I ask what
> totalObjectCount we're talking about?
>
> I recommend splitting the respective component (aka QML file) into
> smaller pieces. QML components are easily nested. You will give yourself
> a much easier time reading the code, too.
>
> best regards,
> Ulf Hermann
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to