From 55ecfd409ca6aa8018be8cc2697b27928fbd4cc2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 5 Oct 2017 11:02:36 +0200 Subject: Simplify compilation unit tracking in the execution engine Instead of collecting all compilation units in a hash, let's collect linked units in a doubly-linked lists that makes the removal at destruction time dramatically cheaper. Change-Id: I9fd59600d082be3566f605d90f14a86a58ac9296 Reviewed-by: Ulf Hermann --- src/qml/compiler/qv4compileddata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/compiler/qv4compileddata.cpp') diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 34491a3a84..294eaa25f5 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -212,7 +212,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) void CompilationUnit::unlink() { if (engine) - engine->compilationUnits.erase(engine->compilationUnits.find(this)); + nextCompilationUnit.remove(); if (isRegisteredWithEngine) { Q_ASSERT(data && propertyCaches.count() > 0 && propertyCaches.at(/*root object*/0)); -- cgit v1.2.3