Hi,

we cannot retroactively make properties FINAL as that can be source incompatible in QML. However, FINAL properties result in a significant performance boost for QML. qmlcachegen, if it can prove that a property you use in your code is actually the property it expects, does not have to wrap it in QVariant and type-check it at run time. You may want to read https://www.qt.io/blog/qt-6.6-and-6.7-make-qml-faster-than-ever-a-new-benchmark-and-analysis and compare the numbers for "Shadowable" and "Static" in the graph. qmlsc has an extra (dangerous) argument "static" that makes it treat all properties as FINAL. If you make your properties FINAL to begin with, you get the same benefit without qmlsc and the extra argument.

So here is my proposal for QUIP 22: https://codereview.qt-project.org/c/meta/quips/+/539986

I've thrown in rules for BINDABLE and REVISION there, too. Those also come up quite frequently.

best regards,
Ulf
--
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to