Skip to content
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

Revise MemoryStream use cases - consider something like RecyclableMemoryStream or base it on Pile #21

Open
itadapter opened this issue Jan 5, 2018 · 0 comments
Assignees
Milestone

Comments

@itadapter
Copy link
Contributor

itadapter commented Jan 5, 2018

MemoryStream allocates arrays in LOH, and it is inefficient.
Along the lines what MSFT did with RecyclablememoryStream, we could use Pile as memory manager or use RecyclableMemoryStream by MSFT as a drop-in replacement.

This deals with perf critical code where MemoryStream gets allocated/released many times.
See:

https://github.com/Microsoft/Microsoft.IO.RecyclableMemoryStream

The design needs to be re-evaluated in the light of: Pile, and ArrayPool/ Memory no to create code duplication

@itadapter itadapter added this to the Future milestone Jan 5, 2018
@itadapter itadapter changed the title Revise MemoryStream use something like RecyclableMemoryStream or base it on Pile Revise MemoryStream use cases - consider something like RecyclableMemoryStream or base it on Pile Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants