fix: Optimize listing calls for NFS mounts (#13159)

--no-compat should allow for some optimized
behavior for NFS mounts by removing Stat()
operations.
This commit is contained in:
Harshavardhana
2021-09-08 08:15:42 -07:00
committed by GitHub
parent 9c5fd6a776
commit 951b1e6a7a
3 changed files with 15 additions and 11 deletions

View File

@@ -276,8 +276,13 @@ func listObjects(ctx context.Context, obj ObjectLayer, bucket, prefix, marker, d
var eof bool
var nextMarker string
maxConcurrent := maxKeys / 10
if maxConcurrent == 0 {
maxConcurrent = maxKeys
}
// List until maxKeys requested.
g := errgroup.WithNErrs(maxKeys).WithConcurrency(10)
g := errgroup.WithNErrs(maxKeys).WithConcurrency(maxConcurrent)
ctx, cancel := g.WithCancelOnError(ctx)
defer cancel()