Skip to content

Conversation

trentmwillis
Copy link
Contributor

Recently ran into an issue with large payloads (megabytes in size) that arrived over many chunks. As the size increased, the time to process them seemed to increase exponentially. After investigating a bit, realized that each time a new chunk arrives, any data in the buffer from before gets re-parsed. Thus, for very large messages you might wind up re-parsing the early data many times.

This change adds a couple variables to track data that has already been processed to skip evaluating it multiple times.

Copy link
Contributor

@aslakhellesoy aslakhellesoy left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this @trentmwillis!

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.

3 participants