Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Reuse a single connection when doing a bucket list
Listing the contents of a bucket can involve multiple requests if the bucket is sufficiently large. The default behavior is to list the objects in batches of 1000. Currently a new connection is created for each batch and this results in unnecessary connection establishment overhead when listing a bucket involves multiple batches. This commit moves the connection creation for listing a bucket into the bucket_list function and changes the send_request function to optionally accept an existing connection as a parameter. This allows the same connection to be reused for listing the entire contents of a bucket.
- Loading branch information
1 parent
a102e10
commit e86de36
Showing
1 changed file
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters