-
- Downloads
os: don't try to make the directory FD non-blocking in os.ReadDir
This will fail because epoll_ctl() fails on directory FDs, so we end up issuing unnecessary syscalls. My test program that calls filepath.WalkDir on a large directory tree runs 1.23 ± 0.04 times faster than with the original implementation. Change-Id: Ie33d798c48057a7b2d0bacac80fcdde5b5a8bb1b Reviewed-on: https://go-review.googlesource.com/c/go/+/570877 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by:Ian Lance Taylor <iant@google.com>
Showing
- src/os/dir.go 1 addition, 1 deletionsrc/os/dir.go
- src/os/file.go 8 additions, 0 deletionssrc/os/file.go
- src/os/file_plan9.go 4 additions, 0 deletionssrc/os/file_plan9.go
- src/os/file_unix.go 28 additions, 2 deletionssrc/os/file_unix.go
- src/os/file_windows.go 4 additions, 0 deletionssrc/os/file_windows.go
Please register or sign in to comment