NewtonsoftJsonResultExecutor disregards MvcNewtonsoftJsonOptions.OutputFormatterMemoryBufferThreshold
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
I'm not sure if this is by design, but it's different from NewtonsoftJsonOutputFormatter.
https://github.com/dotnet/aspnetcore/blob/213eb282fc6d9ce07a1e0a1fbe526c297694ebf6/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonResultExecutor.cs#L98
https://github.com/dotnet/aspnetcore/blob/213eb282fc6d9ce07a1e0a1fbe526c297694ebf6/src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs#L148
We return big collection result sometimes exceeds the default 32K memory buffer.
And we have following questions:
- We plan to set OutputFormatterMemoryBufferThreshold to 8M, is there any bad effect of such a big memory buffer size?
- Is it recommended to set SuppressOutputFormatterBuffering true and allow synchronous IO when using Mvc.Newtonsoft? I guess synchronous IO must be allowed in this case?
Contributor guide
Assessment
This issue has not been assessed yet.