Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[WIP] Akka.IO / Akka.Streams:
ByteString
rewrite #7136base: dev
Are you sure you want to change the base?
[WIP] Akka.IO / Akka.Streams:
ByteString
rewrite #7136Changes from 3 commits
96a6d11
486f5a3
d9c3d98
cd47df3
31122d7
8cbb00b
53a7224
1e37898
0726e2d
abc6aa4
aca4c72
ded7e5c
1a93896
27ae16d
79b01bd
f63896f
4b69e69
411dcb5
8a25c7a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this going to be separate PR?
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.
Going to try to do that here but haven't gotten around to it yet
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.
Food for thought:
.BufferList
, it is better to hide this behind aif (args.Buffer != null)
since the underlying call has a try/catch.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.
Thing that feels very relevant,
Short term, This -screams- pooling scenario and/or
IMemoryOwner
even if we have to deal with semantics internally.I remember hacking something together with one pool or another during my Covid lockdown 'Akka streams remote transport experiment' and it helped a LOT. I think it was somewhere during or just before the hand written protobuf stuff.
Where 'considerations' get important, is the pinning of the arrays underlying the bufferlist.
IDK the current pinning 'status' but last I dug into they all get pinned for a while, and that sucks for the GC.
Thought/suggestion would be in general to use a pooled buffer of some form, but also strongly to consider/measure a single final buffer per
SetBuffer()
call being set on SAEA.Having a pooled buffer increases likelyhood that it will, long term, survive to an older segment and hopefully avoid pinning costs in Gen0/Gen1. (Also, longer term, we can hopefully
#IFDEF
said pooled buffers into POH and get more gains.)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.
Rather than go down that road, I'd prefer to rewrite Akka.IO to not depend on
SocketAsyncEventArgs
and all of the complicated junk inside the TCP and UDP Akka.IO actors. I think some major simplification is in-order there for .NET 6 at least.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.
Stupid question, are newer APIs to the point where SAEA isn't worth the squeeze? Again it's been a while but last I knew SAEA was still the 'best' way.