Better defaults for the Pipe (dotnet/corefx#35939)
authorDavid Fowler <davidfowl@gmail.com>
Mon, 11 Mar 2019 14:31:42 +0000 (07:31 -0700)
committerGitHub <noreply@github.com>
Mon, 11 Mar 2019 14:31:42 +0000 (07:31 -0700)
commit72a931745a236df74c22ebe44197a5560d4f11a2
treebd9c4fcb7d529b2be61d1c4180daecfb9c95a5bc
parent4b3d467c791f63296f253db822a6c74bb24d04f3
Better defaults for the Pipe (dotnet/corefx#35939)

- Use a 4K buffer instead of 2K (4K is a very common buffer size and usually maps to system page size)
- Use a stack for the buffer segment pool and allow pooling more than 16 segments for large writes

Commit migrated from https://github.com/dotnet/corefx/commit/b49b512a6288edd96d4fbb68bf23a4bd2f831545
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeOptions.cs
src/libraries/System.IO.Pipelines/tests/PipeOptionsTests.cs
src/libraries/System.IO.Pipelines/tests/PipePoolTests.cs