getmoto / py-partiql-parser

Python Parser for PartiQL
MIT License
7 stars 2 forks source link

Performance: Allow large sets of JSON docs without StackOverflows #21

Closed bblommers closed 4 months ago

bblommers commented 4 months ago

The previous implementation would call parse() recursively for every document at the root level.

If a file contains more than 300 documents, that quickly becomes a problem.

This PR changes the JsonParser to yield documents instead as and when they come, improving performance and removing the need for any recursion