Skip to content
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

fix(parser): greatly improve expression parsing performance #90

Merged
merged 9 commits into from
Oct 12, 2022

Conversation

martinohmann
Copy link
Owner

Previously, the parser needed to do a lot of backtracking while parsing conditionals and operations which massively degraded performance for deeply nested expressions.

This fix inlines the handling for operations and conditionals into the Expression rule so that an already matched ExprTerm rule does not need to be re-evaluated when no operation/conditional is matched (which is the case in the vast majority of cases since literal values and collections are way more common than these.

Fixes #82

@martinohmann martinohmann merged commit a5b57ef into main Oct 12, 2022
@martinohmann martinohmann deleted the nested-expr-perf branch October 12, 2022 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested function calls leads to extreme parsing times
1 participant