Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

gcs, swift: increase directory listing chunk to 1000 to increase performance

Nick Craig-Wood3a431056e288
diff --git a/googlecloudstorage/googlecloudstorage.go b/googlecloudstorage/googlecloudstorage.go
index a7b459496..873eb645c 100644
--- a/googlecloudstorage/googlecloudstorage.go
+++ b/googlecloudstorage/googlecloudstorage.go
@@ -42,7 +42,7 @@ const (
timeFormatIn = time.RFC3339
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
metaMtime = "mtime" // key to store mtime under in metadata
- listChunks = 256 // chunk size to read directory listings
+ listChunks = 1000 // chunk size to read directory listings
)
var (
diff --git a/swift/swift.go b/swift/swift.go
index 07034e73a..1e577b03a 100644
--- a/swift/swift.go
+++ b/swift/swift.go
@@ -20,6 +20,7 @@ import (
// Constants
const (
directoryMarkerContentType = "application/directory" // content type of directory marker objects
+ listChunks = 1000 // chunk size to read directory listings
)
// Globals
@@ -281,7 +282,7 @@ func (f *Fs) listContainerRoot(container, root string, dir string, level int, fn
// Options for ObjectsWalk
opts := swift.ObjectsOpts{
Prefix: prefix,
- Limit: 256,
+ Limit: listChunks,
}
switch level {
case 1: