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

Do not heap allocate read/write handlers #103

Open
sergiu128 opened this issue Aug 18, 2023 · 0 comments
Open

Do not heap allocate read/write handlers #103

sergiu128 opened this issue Aug 18, 2023 · 0 comments
Assignees
Labels

Comments

@sergiu128
Copy link
Collaborator

sergiu128 commented Aug 18, 2023

In conn.go and packet.go we allocate on each read/write operation through getReadHandler or getWriteHandler. That is unnecessary. We have a solution in multicast.UDPPeer where instead of allocating a handler each time, we keep a reference to it and change its state on-demand on an async read/write.

@sergiu128 sergiu128 added the tcp label Aug 18, 2023
@sergiu128 sergiu128 self-assigned this Aug 18, 2023
@sergiu128 sergiu128 added this to the Improved websocket. milestone Aug 18, 2023
@sergiu128 sergiu128 linked a pull request Sep 21, 2023 that will close this issue
@ethanf ethanf removed this from the Improved websocket. milestone Apr 25, 2024
@sergiu128 sergiu128 changed the title tcp: do not heap allocate read/write handlers Do not heap allocate read/write handlers Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants