aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4executablecompilationunit_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-01-24 08:13:14 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-25 06:54:19 +0100
commit27a4b275e3623b27bc0c9b17c3b144a74f713bb5 (patch)
tree0112dfc2109fb496654ba6806ac6faa454c252d4 /src/qml/jsruntime/qv4executablecompilationunit_p.h
parentf1f81bad2bbef80078735adcb92278953d57ec31 (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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4executablecompilationunit_p.h')
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit_p.h b/src/qml/jsruntime/qv4executablecompilationunit_p.h
index 48ebee6fca..81de2965c2 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit_p.h
+++ b/src/qml/jsruntime/qv4executablecompilationunit_p.h
@@ -204,7 +204,7 @@ public:
return &m_compilationUnit->bindingPropertyDataPerObject.at(objectIndex);
}
- QQmlRefPointer<QV4::CompiledData::CompilationUnit> baseCompilationUnit() const
+ const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &baseCompilationUnit() const
{
return m_compilationUnit;
}