nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8705cb99a3b10dbdfd5490f04ed7c361971c26b2
parent 0ef9ec196e7fa0732a9bce5b3223d4e66a0997ba
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Mon, 18 Nov 2019 19:54:14 +0530

Seek advantage of kernel readahead()

References:
1. http://man7.org/linux/man-pages/man2/posix_fadvise.2.html
2. https://www.oreilly.com/library/view/linux-system-programming/9781449341527/ch04.html

Diffstat:
Msrc/nnn.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -3512,6 +3512,8 @@ static int dentfill(char *path, struct entry **dents) open_max = max_openfds(); } + posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); + dp = readdir(dirp); if (!dp) goto exit;