I'm trying to optimize some QML code for speed and memory.
I know it's possible to create a Qt resource file (*.rcc) to reduce *.qml file space. Although I don't have numbers about how much improvement/compression is obtained with this step.
Check how to do it in Qt/QML Compiling libraries and resources
But, I know too that it's been in some people heads roadmap before to precompile QML files to bytecode, so this step could be avoided in runtime.
So, someone knows if it is possible to precompile QML in any released Qt version? or in any planned?
With Qt 5.3 is possible:
http://doc.qt.digia.com/QtQuickCompiler/
"The Qt Quick Compiler is a development add-on for Qt Quick applications which allows you to compile QML source code into the final binary. When you use this add-on, the application's startup time is significantly improved and you no longer need to deploy .qml files together with the application."
QML pre-compilation to bytecode, is it possible?
Unfortunately, this is not possible as of now. Also, this is a fairly large feature request, so will not probably be supported any time soon. For sure, not in the upcoming 5.2 for which we have the feature freeze in one week, but most probably not even 5.3 for next summer, etc.
I have just discussed this issue shortly with one of the developers, so you may need to live with(out) it for now. I was also asking about creating a jira report for tracking this, but I have been told such a big feature requests are not tracked there like the v4 engine rewriting for the declarative repository in the near past.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With