Improved fs.Walk performance
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-06-20 15:09:05 +02:00
parent b802d878f3
commit fe3212506d
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ func Walk(directory string, callBack func(string)) error {
} }
defer syscall.Close(fd) defer syscall.Close(fd)
buffer := make([]byte, 1024) buffer := make([]byte, 512)
for { for {
n, err := syscall.ReadDirent(fd, buffer) n, err := syscall.ReadDirent(fd, buffer)

View file

@ -30,7 +30,7 @@ func BenchmarkReaddirnames(b *testing.B) {
func(string) {}(file) func(string) {}(file)
} }
f.Close() assert.Nil(b, f.Close())
} }
} }