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

Question about _put_file/upload #796

Open
troychiu opened this issue Sep 21, 2023 · 2 comments
Open

Question about _put_file/upload #796

troychiu opened this issue Sep 21, 2023 · 2 comments

Comments

@troychiu
Copy link
Contributor

troychiu commented Sep 21, 2023

Hi Community,
I have questions about _put_file.
In the multipart upload of _put_file function, I noticed that we are sending a request at a time instead of sending all request at a single time and join them. The latter seems to be faster in my opinion. (I think the idea can also be applied to _get_file/download)
Is there any reason why we do this?
Would be happy to discuss and contribute, thank you!

@martindurant
Copy link
Member

It would be reasonable to write multiple pieces asynchronously. However, the pieces are necessarily large (otherwise a single call is enough), so I very much doubt there would be any time to be saved. The async route will require much more memory, since it would load many blocks of data at once.

Would you mind doing a speed-test to prove that async operation is clearly better?

@troychiu
Copy link
Contributor Author

Yes I agree with your point.
Only when the pieces are large enough, we will get performance improve. Also, async route will require more memory at a single time.
I can try to implement it and test the performance and we can have further discussion :)
Btw, what would be the typical way to test the upload/download speed? Should I directly use a S3 to test or there are other better ways?

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