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

Channels optimization #91

Open
flcl42 opened this issue Aug 19, 2024 · 0 comments
Open

Channels optimization #91

flcl42 opened this issue Aug 19, 2024 · 0 comments

Comments

@flcl42
Copy link
Contributor

flcl42 commented Aug 19, 2024

Is your feature request related to a problem? Please describe.
Channels are used to efficiently pass data through the protocol stack, they are queues of byte chunks and copy happens only when API does not allow working with ReadOnlySequence. Still they need several improvements:

  • initially allocate data in consistent way
  • de-allocate data when it's read
  • when the data is being materialized, provide access to underlying spans, to cover more use cases?
  • detect leaks and de-allocate data that will not be read for sure

Describe the solution you'd like

  • Measure current memory allocations and determine the current level of efficiency, if it's worth it:
  • Add allocator to be used by transport protocols
  • Improve read api
  • De-allocate when needed

Describe alternatives you've considered
TBD

Additional context
How it's now:

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

1 participant