Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.8.0 Alpha
-
None
-
macOS
Description
Steps:
- Get and build https://github.com/Swordfish90/cool-retro-term with Qt 5.8.0 alpha1
- Enable the QML profiler in QtCreator, run the app 2-3 times
Expected results:
QML compilation times are reduced due to caching
Actual results:
QML files are recompiled anyway on each restart (500ms on my mbp)
Enabling logging I first saw those messages, even though I could see .qmlc cache files in ~/Library/Caches/cool-retro-term/qmlcache/:
qt.qml.diskcache: Error loading "qrc:/SettingsScreenTab.qml" from disk cache: "QML source file has a different time stamp than cached file."
This seemed to be caused by invalid timestamps being stored in the cache file headers. I added a timestamp.isValid() check in QQmlDataBlob::Data::readAll and this seemed to remove this warning.
But afterward, even though the cache files seemed to be loaded properly, I would still see QML compilation going on in the QML profiler and CompilationUnit::saveToDisk being called a lot. Not too sure why this is the case at this point, I haven't dug that far. It's probably more efficient if you guys try out cool-retro-term and check what happens