Skip to content

Replace generators with arrays during parsing#645

Merged
eemeli merged 5 commits intomainfrom
generate-less
Dec 14, 2025
Merged

Replace generators with arrays during parsing#645
eemeli merged 5 commits intomainfrom
generate-less

Conversation

@eemeli
Copy link
Copy Markdown
Owner

@eemeli eemeli commented Nov 30, 2025

This PR includes breaking changes, and so is a part of the v3 changes, #601.

There's quite a bit of unnecessary complexity in the parser stages that's removed here by replacing their liberal use of generators with arrays. This was mostly in place to support parsing incomplete/chunked input, but I don't think that functionality is used at all, or almost at all. And so that's dropped here, for an increase in performance.

The changes here have no impact on users of the parse() or parseDocument() APIs, or even most users of the lower-level parser APIs; see the changes made to src/cli.ts for some idea of how user code may need to change.

@eemeli eemeli added this to the v3 milestone Nov 30, 2025
@eemeli eemeli added the v3 Only applies to yaml@3 label Nov 30, 2025
@eemeli eemeli merged commit 6a6f8fb into main Dec 14, 2025
22 checks passed
@eemeli eemeli deleted the generate-less branch December 14, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 Only applies to yaml@3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant