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

Calculate MD5 for each S3 multipart upload incrementally #672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michalc
Copy link

@michalc michalc commented Feb 24, 2019

If ContentMD5 is not passed, botocore process the entire file to work out the MD5 for the upload to S3:

https://github.com/boto/botocore/blob/1ae092ed95b39c3336ba48c5cbd71b7c37924d05/botocore/handlers.py#L200

It's likely better in many situations to calculate the MD5 for each set of bytes as they come in: the data is already in memory/caches.

For event-loop based applications, where file io is often still blocking, this is especially valuable: botocore would block the event loop when it tried to calculate MD5.

@michalc michalc force-pushed the calculate-s3-md5-incrementally branch 3 times, most recently from 9fd9ab1 to 1b31762 Compare February 24, 2019 11:28
If ContentMD5 is not passed, botocore process the entire file to work
out the MD5 for the upload to S3:

https://github.com/boto/botocore/blob/1ae092ed95b39c3336ba48c5cbd71b7c37924d05/botocore/handlers.py#L200

It's likely better in many situations to calculate the MD5 for each set
of bytes as they come in: the data is already in memory/caches.

For event-loop based applications, where file io is often still
blocking, this is especially valuable: botocore would block the event
loop when it tried to calculate MD5.
@michalc michalc force-pushed the calculate-s3-md5-incrementally branch from 1b31762 to 71e303b Compare February 24, 2019 14:43
@sww314 sww314 added the s3boto label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants