8000 reduce bigarray allocations · Issue #34 · robur-coop/utcp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

reduce bigarray allocations #34

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

Open
hannesm opened this issue Dec 16, 2023 · 0 comments
Open

reduce bigarray allocations #34

hannesm opened this issue Dec 16, 2023 · 0 comments

Comments

@hannesm
Copy link
Contributor
hannesm commented Dec 16, 2023

Especially Cstruct.t allocations are costly. Currently, while there are few Cstruct.create (only in segment.ml for checksum pseudo-header (TODO: could be once per flow), and encode/encode_and_checksum (both not used by Utcp_mirage), there are still some Cstruct.concat (since the interface for e.g. Mirage_flow.read is a single Cstruct.t, also internally in uTCP we use a single Cstruct.t for sending (so, the writev just calls write with Cstruct.concat all the buffers). And finally, there's a call to Cstruct.append when stuff was taken from the Reassembly queue (which indeed holds a list, but maybe_take flattens this (using Cstruct.concat)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant
0