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

Have you considered looking at System.IO.Pipelines ? #35

Open
pbolduc opened this issue Jul 8, 2018 · 2 comments
Open

Have you considered looking at System.IO.Pipelines ? #35

pbolduc opened this issue Jul 8, 2018 · 2 comments

Comments

@pbolduc
Copy link

pbolduc commented Jul 8, 2018

Have you looked at using System.IO.Pipelines? Marc Gravell has a blog post about them.

Pipelines - a guided tour of the new IO API in .NET, part 1

It could help reduce the amount data movement in the circular buffer due to Pipelines' Zero copy buffers. I also wonder if there an opportunity to squeeze more performance in the particular case where the files are pure ASCII and avoid converting bytes from files/memory into strings when not required.

@jehugaleahsa
Copy link
Owner

jehugaleahsa commented Jul 8, 2018 via email

@jehugaleahsa
Copy link
Owner

I recently did some more research in this area. The PipeReader class looks promising: https://docs.microsoft.com/en-us/dotnet/api/system.io.pipelines.pipereader?view=dotnet-plat-ext-5.0.

Minimally, for newer platforms, even using the ArrayPool class could speed up performance for newer platforms and eliminate the need for a custom circular array queue: https://docs.microsoft.com/en-us/dotnet/api/system.buffers.arraypool-1?view=net-5.0

It's a little unclear what platforms will support what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants