Skip to content

Commit

Permalink
feat: awss3 DownloadFiles use PooledBufferedWriterReadFromProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtwinkle committed Aug 31, 2023
1 parent ec3734c commit 6d8f00a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aws/awss3/awss3.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ func DownloadFiles(ctx context.Context, region awsconfig.Region, bucketName Buck
}

uniqKeys := keys.Unique()
downloader := manager.NewDownloader(client)
option := func(d *manager.Downloader) {
d.BufferProvider = manager.NewPooledBufferedWriterReadFromProvider(5 * 1024 * 1024)
}
downloader := manager.NewDownloader(client, option)
paths := make([]string, len(uniqKeys))

getFilePath := func(s3Key string) string {
Expand Down

0 comments on commit 6d8f00a

Please sign in to comment.