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

feat: reducing allocations in the 9p protocol layer #107

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

sminez
Copy link
Owner

@sminez sminez commented Mar 16, 2025

Making use of a shared mutable buffer between 9p parsing Coros and the logic running them in the sans-io layer so that we only need to allocate and re-use a single buffer for parsing messages rather than allocating a new Vec for each read.

The resulting public API is a little odd as it means that consumers of the crate will not be able to implement their own IO wrappers unless the methods on SharedBuf are made public. Until there is a use case for that however, I am planning on leaving things this way so that consumers of ninep aren't able to footgun with the unsafe API that SharedBuf exposes.

@sminez sminez merged commit 8ffa017 into develop Mar 17, 2025
8 checks passed
@sminez sminez deleted the reducing-9p-allocations branch March 17, 2025 07:54
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.

1 participant