Skip to content

Commit 6b6ca59

Browse files
authored
Expand DefaultBufferSize remarks (#3146)
1 parent dc0b100 commit 6b6ca59

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

xml/System.Text.Json/JsonSerializerOptions.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ Once serialization or deserialization occurs, the list cannot be modified.
118118
119119
## Remarks
120120
121-
The default buffer size, in bytes, is 16384.
121+
The default buffer size, in bytes, is 16,384.
122+
For most workloads, the default size is a reasonable amount of JSON to buffer while reading from a stream or writing to a stream.
123+
That is, it performs well without creating objects on the Large Object Heap for the Garbage Collector (GC) to track.
124+
In non-streaming scenarios, increasing the default buffer size could improve performance for large JSON strings or UTF-8 byte arrays.
125+
We recommend that you leave this value unchanged unless changing it makes an observable difference in performance.
126+
122127
123128
]]></format>
124129
</remarks>

0 commit comments

Comments
 (0)