diff options
author | Ulf Hermann <[email protected]> | 2024-01-24 08:13:14 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2024-01-25 06:54:19 +0100 |
commit | 27a4b275e3623b27bc0c9b17c3b144a74f713bb5 (patch) | |
tree | 0112dfc2109fb496654ba6806ac6faa454c252d4 /tools/qmljs/qmljs.cpp | |
parent | f1f81bad2bbef80078735adcb92278953d57ec31 (diff) |
QtQml: Use a multihash to store executable CUs
You can produce multiple CUs for the same URL with createQmlObject() and
friends. They need to be marked during garbage collection and therefore
the engine needs to keep track of them.
With the multihash there can be a lot of CUs of the same URL. Searching
through them can take a lot of time. However, there is no point in
searching for an existing executable CU if we've just freshly compiled
the base CU. So, in those cases, insert directly instead.
Fixes: QTBUG-121436
Change-Id: I804dbc74d2ade118f6680a7fbde3f234699ccbc3
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'tools/qmljs/qmljs.cpp')
-rw-r--r-- | tools/qmljs/qmljs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index d6b4d1666b..8a1c4d0ded 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) QString error; if (unit->loadFromDisk(QUrl::fromLocalFile(fn), QFileInfo(fn).lastModified(), &error)) { script.reset(new QV4::Script( - &vm, nullptr, vm.executableCompilationUnit(std::move(unit)))); + &vm, nullptr, vm.insertCompilationUnit(std::move(unit)))); } else { std::cout << "Error loading" << qPrintable(fn) << "from disk cache:" << qPrintable(error) << std::endl; } |