Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55926

qmlcache: Doesn't seem to avoid recompilation when using qrc:/

    XMLWordPrintable

Details

    Description

      Steps:

      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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shausman Simon Hausmann
            jturcott Jocelyn Turcotte
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes