Skip to content

Expand DefaultBufferSize remarks #3146

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion xml/System.Text.Json/JsonSerializerOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ Once serialization or deserialization occurs, the list cannot be modified.

## Remarks

The default buffer size, in bytes, is 16384.
The default buffer size, in bytes, is 16,384.
For most workloads, the default size is a reasonable amount of JSON to buffer while reading from a stream or writing to a stream.
That is, it performs well without creating objects on the Large Object Heap for the Garbage Collector (GC) to track.
In non-streaming scenarios, increasing the default buffer size could improve performance for large JSON strings or UTF-8 byte arrays.
We recommend that you leave this value unchanged unless changing it makes an observable difference in performance.
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @steveharter - please review



]]></format>
</remarks>
Expand Down