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

create_stream_for_chunk builds up 8mb chunk of memory #702

Open
silverjam opened this issue Feb 13, 2025 · 1 comment
Open

create_stream_for_chunk builds up 8mb chunk of memory #702

silverjam opened this issue Feb 13, 2025 · 1 comment

Comments

@silverjam
Copy link
Contributor

In create_stream_for_chunk the stated purpose is to create a stream of small chunks of memory read from a Reader object however it appears that during the aws_sdk migration there was a need to transform the stream to a different type per the comment here:

while let Some(bytes) = stream.try_next().await? {

This while loop ends up building up an 8mb chunk of memory anyway. If this is an issue for memory usage in the future I would suggest remove this function and just passing a whole 8mb chunk to the multi-part PUT call, or fix the method (somehow) so that the streaming behavior can be maintained.

@pcrumley
Copy link
Contributor

Thanks for pointing this out. It seems like a somewhat minor issue, unless I am missing something.

I'll need to see if we can remove the method or if it needs to be fixed.

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

2 participants