From 9738d605e4b2f004b49da46736137b92eca86f16 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 18 Nov 2020 09:21:02 -0800 Subject: [PATCH] increase readdir per block memory to facilitate faster WalkDir (#10908) --- cmd/os-readdir_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/os-readdir_unix.go b/cmd/os-readdir_unix.go index 8fec5a7a3..1c3a461b1 100644 --- a/cmd/os-readdir_unix.go +++ b/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 }, }