increase readdir per block memory to facilitate faster WalkDir (#10908)

master
Harshavardhana 4 years ago committed by GitHub
parent 7ff8128f15
commit 9738d605e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/os-readdir_unix.go

@ -31,10 +31,10 @@ import (
// refer https://github.com/golang/go/issues/24015
const blockSize = 8 << 10 // 8192
// By default atleast 20 entries in single getdents call
// By default atleast 128 entries in single getdents call (1MiB buffer)
var direntPool = sync.Pool{
New: func() interface{} {
buf := make([]byte, blockSize*20)
buf := make([]byte, blockSize*128)
return &buf
},
}

Loading…
Cancel
Save