forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -446,8 +446,8 @@ protected:
|
|||||||
Value *sym_stack = nullptr;
|
Value *sym_stack = nullptr;
|
||||||
int *state_stack = nullptr;
|
int *state_stack = nullptr;
|
||||||
SourceLocation *location_stack = nullptr;
|
SourceLocation *location_stack = nullptr;
|
||||||
QVector<QStringView> string_stack;
|
std::vector<QStringView> string_stack;
|
||||||
QVector<QStringView> rawString_stack;
|
std::vector<QStringView> rawString_stack;
|
||||||
|
|
||||||
AST::Node *program = nullptr;
|
AST::Node *program = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -247,8 +247,8 @@ protected:
|
|||||||
Value *sym_stack = nullptr;
|
Value *sym_stack = nullptr;
|
||||||
int *state_stack = nullptr;
|
int *state_stack = nullptr;
|
||||||
SourceLocation *location_stack = nullptr;
|
SourceLocation *location_stack = nullptr;
|
||||||
QVector<QStringView> string_stack;
|
std::vector<QStringView> string_stack;
|
||||||
QVector<QStringView> rawString_stack;
|
std::vector<QStringView> rawString_stack;
|
||||||
|
|
||||||
AST::Node *program = nullptr;
|
AST::Node *program = nullptr;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user