-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Do not flush serializer buffers before first IAsyncEnumerable element is fetched #59808
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
Do not flush serializer buffers before first IAsyncEnumerable element is fetched #59808
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsAddresses dotnet/aspnetcore#36977 See dotnet/aspnetcore#36977 (comment) for an explanation of the issue. Should consider servicing in 6.0
|
Nice. FYI @BrennanConroy since this would resolve the IAsyncEnumerable issue. |
...son/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.AsyncEnumerable.cs
Show resolved
Hide resolved
...son/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs
Show resolved
Hide resolved
...libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strategy of deferring the first flush is sound; a couple questions around Asserts
|
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1295615263 |
Addresses dotnet/aspnetcore#36977
See dotnet/aspnetcore#36977 (comment) for an explanation of the issue.
I ran the benchmark suite against the changes and no performance regression was recorded.
Should consider servicing in 6.0.