-
Notifications
You must be signed in to change notification settings - Fork 72
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
Streaming decode #73
Comments
Hi, thank you for proposing this new feature.
Of course. BTW, this is just out of curiosity, but are there any reasons you could not use |
My idea is to hook into the error cases, where the remaining input is
jsone has better performance. Since the point of this is to improve performance, it'd be unfortunate to switch to a slower lib. :-) Regarding performance in general jsone is one of the best (if NIFs are not allowed). Jason is apparently slighly faster and I was interested in why. Thoas is an Erlang port of Jason and it's actually very similar to jsone, but it has some optimisations that might be possible to use in jsone too, if you're interested. |
Sounds promising!
This is very useful information. Thanks! |
Hi!
Parsing a document incrementally, feeding the decoder chunks as they arrive as TCP packets over the socket, could speed up the total handling of a request.
We're receiving ~2MB JSON requests over HTTP/2 where each document is interleaved with other requests in the same HTTP/2 connection, which makes the latency for per request even higher when there are many concurrent requests on the same connection.
An idea is to use an API similar to how JSX streming decode API:
We could use another representation too. Any preference? Would you be willing to accept a PR?
The text was updated successfully, but these errors were encountered: