Measured stat performance, io_uring not worth it

Large directories are slow for different reasons.
This commit is contained in:
Přemysl Eric Janouch 2021-10-05 19:18:15 +02:00
parent e1b0831854
commit 0d10ae06e6
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 3 deletions

View File

@ -638,9 +638,8 @@ fun make_entry (const struct dirent *f) -> entry {
e.info.st_mode = DTTOIF (f->d_type); e.info.st_mode = DTTOIF (f->d_type);
auto &info = e.info; auto &info = e.info;
// TODO: benchmark just readdir() vs. lstat(), also on dead mounts; // io_uring is only at most about 50% faster, though it might help with
// it might make sense to stat asynchronously in threads // slowly statting devices, at a major complexity cost.
// http://lkml.iu.edu/hypermail//linux/kernel/0804.3/1616.html
if (lstat (f->d_name, &info)) { if (lstat (f->d_name, &info)) {
e.cols[entry::MODES] = apply_attrs ({ decode_type (info.st_mode), e.cols[entry::MODES] = apply_attrs ({ decode_type (info.st_mode),
L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?' }, 0); L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?' }, 0);