stat is slow
Closed this issue · 1 comments
milahu commented
stat is about 100 times slower than readdir
wget https://annas-archive.org/dyn/small_file/torrents/managed_by_aa/zlib/pilimi-zlib-12160000-12229999.torrent
mkdir mount_dir
btfs pilimi-zlib-12160000-12229999.torrent mount_dir
sleep 5 # wait for init
time ls mount_dir/pilimi-zlib-12160000-12229999 | wc -l
# 61189
# real 0m0.549s
time find mount_dir/pilimi-zlib-12160000-12229999/ -type f | wc -l
# 61189
# real 0m46.828s
compare
mkdir /run/user/$UID/btfs_test
cd /run/user/$UID/btfs_test
seq 61189 | xargs touch
time ls | wc -l
# 61189
# real 0m0.541s
time find . -type f | wc -l
# 61189
# real 0m0.152s
example torrent from annas-archive.org
johang commented
Doesn't really surprise me. FUSE has a lot of overhead and is not meant to be used for high performance applications.