On Friday, 1 June 2018 13:10:57 CEST Alexander Volkov wrote: > Hi all, > > It would be nice to install .qmlc files in addition to .qml files to > reduce start-up time of applications. > They are generated with qmlcachegen. For Qt 5.11: > qmlcachegen -o example.qmlc qxample.qml > > Currently qml files are usually installed the following way: > install(DIRECTORY qml/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kcm) > > So this could be changed to something like > ecm_install_qml(qml org/kde/kcm) > > I wonder whether someone already working on this or want to implement > such a function? > If not, I'll try to do it myself.
Qt 5.11 actually has something like this, but only covering QML files compiled in via qrc, see qtquick_compiler_add_resources() (I needed a very recent 5.11 branch build though for this to work, post 5.11.1). I have no performance measurements yet, but at least the package size goes up contrary to what one might expect, as the compiled binary is 2-3x larger than the (non-minified) QML source code. That space would be needed by the qmlc files anyway in the end though, so overall disk space cost goes down a bit once deployed. With the QML sources no longer included you end up with a non-starting application after updating Qt though. So, interesting for APKs etc where you fully control Qt, but probably not for distros. Regards, Volker
signature.asc
Description: This is a digitally signed message part.