8000 Speed up JSON parsing with readinto (#3728 for 6.0.x) by dhalbert · Pull Request #3870 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Speed up JSON parsing with readinto (#3728 for 6.0.x) #3870

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

Merged
merged 2 commits into from
Dec 23, 2020

Conversation

dhalbert
Copy link
Collaborator

This backports #3728 to 6.0.x. It would be great if someone else could test this, because I'm not sure what a good simple test would be.

Get a chunk of data from readinto instead of a single byte. This
speeds up the parsing by reducing the number of function calls.

Fixes adafruit#3703
@dhalbert dhalbert requested review from tannewt and jepler December 23, 2020 18:53
@dhalbert
Copy link
Collaborator Author

I'm thinking maybe this is not worth it because most ESP32-S2 users are on 6.1.x.

@tannewt
Copy link
Member
tannewt commented Dec 23, 2020

It would help other SAMD51 portal projects though. If it's not too much work I think it's worth having.

@dhalbert
Copy link
Collaborator Author

I tested a very chonky (250kB) .json on ESP32-S2 and it worked.

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit baa053b into adafruit:6.0.x Dec 23, 2020
@dhalbert dhalbert deleted the speedup_json-6.0.x branch December 28, 2020 19:27
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

Successfully merging this pull request may close these issues.

2 participants
0