Skip to content

Implement zero-copy writes for the multiplexer#395

Draft
bdraco wants to merge 9 commits intoNabuCasa:mainfrom
bdraco:zerocopy_writes
Draft

Implement zero-copy writes for the multiplexer#395
bdraco wants to merge 9 commits intoNabuCasa:mainfrom
bdraco:zerocopy_writes

Conversation

@bdraco
Copy link
Collaborator

@bdraco bdraco commented Mar 9, 2025

closes #394

Note that this likely won't make any difference until #369 and #344 because the current implementation forces many small reads which negate much of the benefit here. Since we benchmark both sides of the connection, the benchmark won't improve much either until we can get the read buffer size a bit more aligned with the use case.

On 1 MiB message this will make quite a bit of a difference for a write op even if its only a small part of the whole stack:
Screenshot 2025-03-08 at 4 11 37 PM

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 9, 2025

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing bdraco:zerocopy_writes (af94ca7) with main (612cdb4)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (dd9de84) during the generation of this report, so 612cdb4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@bdraco
Copy link
Collaborator Author

bdraco commented Mar 9, 2025

Marking as draft to wait for #369 and #344 since it will change the dynamic

@bdraco bdraco marked this pull request as draft March 9, 2025 02:12
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

Successfully merging this pull request may close these issues.

Core multiplexer writer can avoid bytes join on write

1 participant