-
Notifications
You must be signed in to change notification settings - Fork 204
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
Refactor buffer management for ArrayPool #355
base: master
Are you sure you want to change the base?
Conversation
- Added [Ignore("ArrayPool")] to tests in Tests.cs to skip tests reliant on ArrayPool. - Commented out ArrayPool-related assertions in Tests.cs. - Modified buffer length check in ReturnTempBuffer method in RecyclableMemoryStream.cs. - Replaced custom small pool with ArrayPool<byte> in RecyclableMemoryStreamManager.cs. - Removed small pool fields and related public properties/methods. - Updated GetBlock and ReturnBlock methods to use ArrayPool<byte>. - Removed small pool state reporting methods. - Added ArrayPool<byte> property to Options class, defaulting to ArrayPool<byte>.Shared.
@paulomorgado please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Provocative indeed...not sure how I feel about this one. Probably the best thing for me to do would be drop it into some test machines running Bing/XAP and see how it compares with the baseline. Those machines are currently being used to validate Bing on .NET 9, but once that's done, this would be an interesting experiment. |
Being based on |
This is mostly a provocatory PR.
Using
ArrayPool<byte>
for this class has been mentioned around the interwebs.I'm not sure a drop-in using
ArrayPool<byte>
is possible, or even a good idea, but here it is.