Use Utf8JsonWriter with a buffer writer that pools its buffers
Open
area-json
area-perf
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
When we serialize to JSON, we currently construct a Utf8JsonWriter over MemoryStream; this means buffers are continuously allocated and thrown away. Instead, we could write into a Stream (or BufferWriter) over pooled buffers. See the implementation of JsonNode.ToString for an example.
Contributor guide
Assessment
This issue has not been assessed yet.