summaryrefslogtreecommitdiff
path: root/sdn.cpp
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-05 19:18:15 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-05 19:18:15 +0200
commit0d10ae06e69dae574795941e60d2408706ed15a9 (patch)
treeba82a45c9a79bc9c25de513a40aef0cba80180ac /sdn.cpp
parente1b0831854b58eea3381e29cee39f3f076ee5d7c (diff)
downloadsdn-0d10ae06e69dae574795941e60d2408706ed15a9.tar.gz
sdn-0d10ae06e69dae574795941e60d2408706ed15a9.tar.xz
sdn-0d10ae06e69dae574795941e60d2408706ed15a9.zip
Measured stat performance, io_uring not worth it
Large directories are slow for different reasons.
Diffstat (limited to 'sdn.cpp')
-rw-r--r--sdn.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/sdn.cpp b/sdn.cpp
index 5012bae..58c24d5 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -638,9 +638,8 @@ fun make_entry (const struct dirent *f) -> entry {
e.info.st_mode = DTTOIF (f->d_type);
auto &info = e.info;
- // TODO: benchmark just readdir() vs. lstat(), also on dead mounts;
- // it might make sense to stat asynchronously in threads
- // http://lkml.iu.edu/hypermail//linux/kernel/0804.3/1616.html
+ // io_uring is only at most about 50% faster, though it might help with
+ // slowly statting devices, at a major complexity cost.
if (lstat (f->d_name, &info)) {
e.cols[entry::MODES] = apply_attrs ({ decode_type (info.st_mode),
L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?', L'?' }, 0);