gcs, swift: increase directory listing chunk to 1000 to increase performance
This commit is contained in:
parent
53c3e5f0ab
commit
3a431056e2
2 changed files with 3 additions and 2 deletions
|
@ -42,7 +42,7 @@ const (
|
||||||
timeFormatIn = time.RFC3339
|
timeFormatIn = time.RFC3339
|
||||||
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
||||||
metaMtime = "mtime" // key to store mtime under in metadata
|
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 (
|
var (
|
||||||
|
|
|
@ -20,6 +20,7 @@ import (
|
||||||
// Constants
|
// Constants
|
||||||
const (
|
const (
|
||||||
directoryMarkerContentType = "application/directory" // content type of directory marker objects
|
directoryMarkerContentType = "application/directory" // content type of directory marker objects
|
||||||
|
listChunks = 1000 // chunk size to read directory listings
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
|
@ -281,7 +282,7 @@ func (f *Fs) listContainerRoot(container, root string, dir string, level int, fn
|
||||||
// Options for ObjectsWalk
|
// Options for ObjectsWalk
|
||||||
opts := swift.ObjectsOpts{
|
opts := swift.ObjectsOpts{
|
||||||
Prefix: prefix,
|
Prefix: prefix,
|
||||||
Limit: 256,
|
Limit: listChunks,
|
||||||
}
|
}
|
||||||
switch level {
|
switch level {
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Reference in a new issue