Component Page is slower to load the first time. Why?
-
I currently have a code base for the display of an electric appliance which uses multiple pages. The pages are loaded dynamically as and when required. When the user turns off the power from mains, the UI is booted again; while powering it off uses the UI doesn't.
Now what I observed was that after booting the device (by powering the device off and then on from mains), then the loading of a particular page is really slow. But when I turn it off and on from the UI, the page loads really fast.
I checked the code to find that the object is destroyed on powering the UI off. I feel like I'm missing something here. Any opinions?
-
Hi
Can it be first time, you also see the load times from the Qt so/dlls ? -
@mrjj No, I'm pretty sure that the Qt object are already loaded. The "main.cpp" file creates all of them before the UI is initialized.
I forgot to mention; the UI is originally in "init" state; here all qml objects in main.qml have been initialized (and as main.cpp creates all C++ classes before qml stuff is started; C++ classes are also created). Then we go to second state where the page in question is loaded.