Skip to content

Speed up writing JSON to a string #377

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jacobwilliams opened this issue Jan 7, 2019 · 0 comments
Closed

Speed up writing JSON to a string #377

jacobwilliams opened this issue Jan 7, 2019 · 0 comments

Comments

@jacobwilliams
Copy link
Owner

Printing JSON to a string is slow (i.e., in json_value_print), probably because of all the string reallocations. Likely it could be sped up by allocating in chunks to reduce the number of allocations.

jacobwilliams added a commit that referenced this issue Jan 7, 2019
This was done by reducing the number of string allocations during this process. The string is now allocated in chunks of 1000 characters (which is sort of arbitrary).
Some minor refactoring also.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant