aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/parser/qmljs.g
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-06-24 10:57:50 +0200
committerhjk <hjk@qt.io>2022-06-28 11:50:27 +0000
commitd45104f5db3e8bacb3b5a443dcf304467a31c0cc (patch)
treefbb2c8b048c030d1134ba192fce4d28dd3376b3a /src/libs/qmljs/parser/qmljs.g
parente2bb204d4df47636549f2877c243e8c891cd71f3 (diff)
QmlJS: Improve parser performance
Detaching the rawString_stack alone shows up at 0.85% when loading Creator inside Creator. One write access is actually used from qmljs.g:699, 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: I081bf5741899a01e4126b7ffe4f36e4844f0b19e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Diffstat (limited to 'src/libs/qmljs/parser/qmljs.g')
-rw-r--r--src/libs/qmljs/parser/qmljs.g4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/qmljs/parser/qmljs.g b/src/libs/qmljs/parser/qmljs.g
index 5f62edf4d1..1c81e265fd 100644
--- a/src/libs/qmljs/parser/qmljs.g
+++ b/src/libs/qmljs/parser/qmljs.g
@@ -446,8 +446,8 @@ protected:
Value *sym_stack = nullptr;
int *state_stack = nullptr;
SourceLocation *location_stack = nullptr;
- QVector<QStringView> string_stack;
- QVector<QStringView> rawString_stack;
+ std::vector<QStringView> string_stack;
+ std::vector<QStringView> rawString_stack;
AST::Node *program = nullptr;