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

JSON parser uses lots of memory and takes twice the time of jq #1276

Open
tooptoop4 opened this issue Apr 27, 2023 · 1 comment
Open

JSON parser uses lots of memory and takes twice the time of jq #1276

tooptoop4 opened this issue Apr 27, 2023 · 1 comment
Assignees

Comments

@tooptoop4
Copy link

for 100mb file (10k records)

this takes 2mins and uses 14gb memory:
mlr --ijson count <file>

while jq length command takes 1min and uses 5gb memory

@johnkerl johnkerl self-assigned this Apr 27, 2023
@tooptoop4
Copy link
Author

i found https://github.com/TeskaLabs/cysimdjson to be best for just counting records and https://github.com/python-rapidjson/python-rapidjson for accessing all the fields

@johnkerl johnkerl changed the title json parser uses lots of memory and takes x2 time of jq JSON parser uses lots of memory and takes twice the time of jq May 15, 2023
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

No branches or pull requests

2 participants