[Interest] Caching of compiled/initialized qml code to disk possible?

Juergen Bocklage-Ryannel lists at ryannel.org
Wed Jan 15 21:54:44 CET 2014


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 at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140115/1f5e4415/attachment.html>


More information about the Interest mailing list