Skip to content

Improve ExpressionStatement parsing, lower priority for ExprJavaCall/ExprCustomEventValue#162

Merged
sovdeeth merged 7 commits into2.xfrom
patch/improve-parsing
Feb 1, 2026
Merged

Improve ExpressionStatement parsing, lower priority for ExprJavaCall/ExprCustomEventValue#162
sovdeeth merged 7 commits into2.xfrom
patch/improve-parsing

Conversation

@sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Jan 29, 2026

The ExpressionStatement syntaxes effectively tripled the parse time for every line, as they would match everything and complete the same parse, just to throw it away if it wasn't an ExprJavaCall. Instead, this uses a regex match and then manually parses it using only ExprJavaCall, significantly saving in wasted parse times.

Also, the ExpressionStatement, ExprJavaCall, and ExprCustomEventValue syntaxes have all had their priority reduced to nearly last, to help prevent extraneous parses.

Overall parse times see pretty significant improvements, from 56s to 14s, 20s to 13s, and 16s -> 4s.

@sovdeeth sovdeeth added bug Something isn't working enhancement New feature or request labels Jan 29, 2026
@sovdeeth sovdeeth merged commit f7319ea into 2.x Feb 1, 2026
2 checks passed
@sovdeeth sovdeeth deleted the patch/improve-parsing branch February 1, 2026 00:00
@sovdeeth sovdeeth restored the patch/improve-parsing branch February 1, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants