I do have a query about performance. It takes several minutes to generate the file listing with such large directories. Is there some way to improve this?
There seems to be several lookups per file (most are symlinks to files in subdirs)
10:41:59.755329 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemejltree-2021.tar.xz", {st_mode=S_IFLNK|0777, st_size=35, ...}, AT_SYMLINK_NOFOLLOW) = 0 <0.000040>
10:41:59.755418 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemejltree-2021.tar.xz", {st_mode=S_IFREG|0644, st_size=1500, ...}, 0) = 0 <0.000049>
10:41:59.755532 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemejltree-2021.tar.xz", {st_mode=S_IFREG|0644, st_size=1500, ...}, 0) = 0 <0.000014>
10:41:59.755603 newfstatat(AT_FDCWD</>, ".", {st_mode=S_IFDIR|0755, st_size=318, ...},
0) = 0 <0.000025>
10:41:59.755672 newfstatat(AT_FDCWD</>, "/", {st_mode=S_IFDIR|0755, st_size=318, ...},
0) = 0 <0.000021>
10:41:59.755754 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemenirma-2021.tar.xz", {st_mode=S_IFLNK|0777, st_size=34, ...}, AT_SYMLINK_NOFOLLOW) = 0 <0.000024>
10:41:59.755837 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemenirma-2021.tar.xz", {st_mode=S_IFREG|0644, st_size=2704, ...}, 0) = 0 <0.000053>
10:41:59.755942 newfstatat(AT_FDCWD</>, "/var/www/domains/mirrors.tnonline.net/gentoo/gentoo-distfiles/distfiles/tl-beamerthemenirma-2021.tar.xz", {st_mode=S_IFREG|0644, st_size=2704, ...}, 0) = 0 <0.000024>
10:41:59.756026 newfstatat(AT_FDCWD</>, ".", {st_mode=S_IFDIR|0755, st_size=318, ...},
0) = 0 <0.000011>
10:41:59.756091 newfstatat(AT_FDCWD</>, "/", {st_mode=S_IFDIR|0755, st_size=318, ...},
0) = 0 <0.000025>
For example do we need to lookup symlink targets instead of simply displaying a link in the dirlisting (like ls -l
does). (Enhancement: file-server browser, allow for listing symlinks as symlinks · Issue #5810 · caddyserver/caddy · GitHub)
Also, is it nessecary to do fstatat
on .
and /
after each file?
The complete file list is available at https://mirrors.tnonline.net/gentoo/gentoo-distfiles.ls-laFR.txt