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

perf(perser-adaper-json): fold syntactic analysis phases #407

Merged
merged 1 commit into from
May 19, 2021

Conversation

char0n
Copy link
Member

@char0n char0n commented May 19, 2021

Code of the parser have been consolidate into idiomatic
parsing phases: lexical and syntactic analysis.

There are two types of syntactic analysis: direct and indirect.

Indirect syntactic analysis is refactored and simplified original code
which turncs CST into JSON AST and then into ApiDOM.
Direct one is a new one which turns CST directly into ApiDOM.
Switching syntactic analysis is possible via configuration option.

Performance of direct syntactic analysis has been increased by
300% comparsing to original code.

Performance of indirect syntactic analysis has been increased by
10% comparing to original code and has been significantly simplified.

Closes #406

Code of the parser have been consolidate into idiomatic
parsing phases: lexical and syntactic analysis.

There are two types of syntactic analysis: direct and indirect.

Indirect syntactic analysis is refactored and simplified original code
which turncs CST into JSON AST and then into ApiDOM.
Direct one is a new one which turns CST directly into ApiDOM.
Switching syntactic analysis is possible via configuration option.

Performance of direct syntactic analysis has been increased by
300% comparsing to original code.

Performance of indirect syntactic analysis has been increased by
10% comparing to original code and has been significantly simplified.

Closes #406
@char0n char0n added enhancement New feature or request ApiDOM JSON labels May 19, 2021
@char0n char0n self-assigned this May 19, 2021
@char0n char0n merged commit c983b47 into master May 19, 2021
@char0n char0n deleted the char0n/fold-phases branch May 19, 2021 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ApiDOM enhancement New feature or request JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fold JSON parser syntactic analysis with transform phase
1 participant