diff options
author | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2022-06-28 13:38:07 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2022-07-25 10:26:06 +0000 |
commit | 29c552d363e3867b02a7c97d36cfc53d66d9ed5a (patch) | |
tree | c1906635b958f30f793077b73b34b1684bb8b330 /src/qml/parser/qqmljs.g | |
parent | 2f4935289e99cd5f174316ceb82032d62292bd46 (diff) |
qqmljs.g: improve performance avoiding reference counted container
As detected in Creator by hjk:
Detaching the rawString_stack alone shows up at 0.85% when loading
Creator inside Creator. One write access is actually used from
qmljs.g:593, so making the whole function const would need more work.
Take a short cut and replace the unneeded reference counted container
with a non-reference counted one.
Change-Id: I480d539f532f9dbfbb0ddef986a7177dfca9b173
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/parser/qqmljs.g')
-rw-r--r-- | src/qml/parser/qqmljs.g | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g index ad0aeb2b74..ab4d94728c 100644 --- a/src/qml/parser/qqmljs.g +++ b/src/qml/parser/qqmljs.g @@ -340,8 +340,8 @@ protected: Value *sym_stack = nullptr; int *state_stack = nullptr; SourceLocation *location_stack = nullptr; - QList<QStringView> string_stack; - QList<QStringView> rawString_stack; + std::vector<QStringView> string_stack; + std::vector<QStringView> rawString_stack; AST::Node *program = nullptr; |