dotnet / dotnet/efcore

Use Utf8JsonWriter with a buffer writer that pools its buffers

Open
#31,228 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.