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

Avoid unnecessary head_object requests #170

Open
neg3ntropy opened this issue Nov 23, 2020 · 0 comments
Open

Avoid unnecessary head_object requests #170

neg3ntropy opened this issue Nov 23, 2020 · 0 comments

Comments

@neg3ntropy
Copy link

I am using boto to download "folders" containing lots of small files from S3. I have noticed that an extra HEAD request is being performed before each GET, which results in slowdowns, throttling and $$$.

I understand that knowing the size beforehand is required to to decide whether to do a multipart download or not, but I consider the current behavior to be wasteful, because:

  • I might disable multipart but the request is still performed
  • I might already know the size of the object (from the list_objects that I am iterating on)

I propose supporting a "size hint" parameter to bypass the head_object call.

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

1 participant