-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
use PoolingAsyncValueTaskMethodBuilder in BufferedFileStreamStrategy #56095
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue Details@stephentoub from the initial benchmark run it seems that it saves a lot of allocations when buffering is actually used:
I am going to run all benchmarks MANY times (>1h) and get back with full results. In the meantime, I hope the CI can test it for me
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the numbers end up looking good, LGTM. As I noted offline, this is one of the places I'd been eyeing for us to look at using it. In addition to perf tests validating serialized execution, it'd also be good to run some that stress doing operations on multiple FileStreams in parallel, as you might find on a server. I'm hopeful that my recent changes to the pooling builder will avoid any deleterious effects there.
Http3_MsQuic test failures are tracked in #56090. Should be fixed and merged shortly. Sorry for the inconvenience! |
The perf numbers LGTM, there is a nice allocation win for the scenario when buffering is enabled and user buffer is small (512 bytes):
|
We don't have such tests yet. The scenario covered by ASP.NET benchmarks uses |
👍🏾 . I'm looking to make websocket reads allocation free as well 😄 |
As long as we continue to support CloseAsyncs being issued concurrently with ReadAsyncs, that's going to be very challenging to do. (In the past I've questioned whether that's something we need to maintain, but I don't have evidence one way or another as to whether folks might be doing that.) |
Actually, I came at it a different way and think I have a reasonable solution. |
@stephentoub from the initial benchmark run it seems that it saves a lot of allocations when buffering is actually used:
I am going to run all benchmarks MANY times (>1h) and get back with full results. In the meantime, I hope the CI can test it for me