[Interest] Caching of compiled/initialized qml code to disk possible?
Hi all, I have an application written with Qt 5.2 in C++ and QtQuick2, running on a low-end ARM device. I use the Loader item to select between various screens in the application (I've currently got 6 screens or so). This way I can limit the amount of active bindings at a given time, etc. The first time I enter a new screen, there is a very noticeable delay (1-2 seconds), as the new items are compiled. The next time I enter the same screen, the delay is much shorter. So I guess some things have been cached in memory. Would it be possible to cache this on disk, to prevent this from happening every single time the application is started? I'm asking for something pretty similar to Python's .pyc files. Is it possible, or would it be possible in some future version of Qt? Cheers, Ola ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Caching of compiled/initialized qml code to disk possible?
Hi, We are currently working on a project where we cache all screens on start-up, by using Qt.createComponent(url). By this the major components are parsed and cached on start-up. It has also a second benefit, it verifies your components on syntax error on start-up. For my knowledge the Loader element will try to load the component later and will hit the cache (as the URL is the same). Actually we go even a step further to create a large registry of all application screens so we can call the screens by the registered name and not the component url. / jryannel On 15.01.14 15:26, Ola Røer Thorsen wrote: Hi all, I have an application written with Qt 5.2 in C++ and QtQuick2, running on a low-end ARM device. I use the Loader item to select between various screens in the application (I've currently got 6 screens or so). This way I can limit the amount of active bindings at a given time, etc. The first time I enter a new screen, there is a very noticeable delay (1-2 seconds), as the new items are compiled. The next time I enter the same screen, the delay is much shorter. So I guess some things have been cached in memory. Would it be possible to cache this on disk, to prevent this from happening every single time the application is started? I'm asking for something pretty similar to Python's .pyc files. Is it possible, or would it be possible in some future version of Qt? Cheers, Ola ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Caching of compiled/initialized qml code to disk possible?
On Wed, Jan 15, 2014 at 6:26 AM, Ola Røer Thorsen o...@silentwings.no wrote: Hi all, I have an application written with Qt 5.2 in C++ and QtQuick2, running on a low-end ARM device. I use the Loader item to select between various screens in the application (I've currently got 6 screens or so). This way I can limit the amount of active bindings at a given time, etc. The first time I enter a new screen, there is a very noticeable delay (1-2 seconds), as the new items are compiled. The next time I enter the same screen, the delay is much shorter. So I guess some things have been cached in memory. Would it be possible to cache this on disk, to prevent this from happening every single time the application is started? I'm asking for something pretty similar to Python's .pyc files. Is it possible, or would it be possible in some future version of Qt? An optimization of this sort has been investigated, and while not possible now it is possible in a future version of Qt. I just don't know when that work will be done, so it might be a while. -- Alan Alpert ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest