-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YAML] Improve Performance #3924
Conversation
baf9003
to
34009aa
Compare
This commit improves parsing performance by about 4-6%.
This commit improves parsing performance by about 16%. It reorganizes imports in `block-node-11` and `block-node-12` contexts in order to avoid `flow-scalar-plain-out-1x` and `flow-scalar-plain-in-1x` being included at the same time.
34009aa
to
5620b3d
Compare
@keith-hall and @FichteFoll, this doesn't change anything you're extending, does it? Otherwise looks good to me. |
I've checked against
|
\s+ \# | ||
| \s* (?: $ | {{c_flow_indicator}} | : (?:\s|$|{{c_flow_indicator}}) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the effect on performance here caused by not grouping or by using a capturing group? Because I find the new grouping much harder to follow (though that could probably be solved by just splitting it over multiple lines).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplicate \s*
had most impact.
This PR proposes some changes to improve parsing performance by about 18-20%
Syntax cache size drops from 58kB to 41kB (-30%).