diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-27 11:47:53 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-01 09:42:06 +0000 |
commit | e99038b24d8b9f4a8cc503d1e3f789a93a3e8330 (patch) | |
tree | 05a43cf4833f5eba65f54e7fbb61fa49575ba14d /src/qml/compiler/qv4compiler.cpp | |
parent | 73fc89bb0dbe9a866e7b1cf47a42a85e5042fead (diff) |
Reduce memory consumption when loading AOT generated cache files
Separate the qml data (objects/imports) from the general compilation
unit data. It's only the former that needs to be re-generated as part of
the type re-compilation and by separating it we can allocate memory just
for that and keep using the mmap'ed general unit data for everything
else (including byte code).
Another upside of this change is that it allows eliminating the recently
introduced concept of a backing unit again.
Saves ~149K RAM with the QQC1 gallery.
Task-number: QTBUG-69588
Change-Id: Ie88a4286feb7e2f472f58a28fa5dd6ff0a91c4b6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 44b809899f..f301f867c1 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -590,10 +590,7 @@ QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Comp unit.sourceFileIndex = getStringId(module->fileName); unit.finalUrlIndex = getStringId(module->finalUrl); unit.sourceTimeStamp = module->sourceTimeStamp.isValid() ? module->sourceTimeStamp.toMSecsSinceEpoch() : 0; - unit.nImports = 0; - unit.offsetToImports = 0; - unit.nObjects = 0; - unit.offsetToObjects = 0; + unit.offsetToQmlUnit = 0; unit.unitSize = nextOffset; |