Previously, the unix extended attributes are always read no matter what. This is maybe not ideal, as it is very expensive to call for files which we will not display and leads to significantly (~300x with level = 2) worse runtimes recursing large directories. This is fixed by only calling unix::Attrs::from when it is a file which is going to be displayed.
This is my first PR here, so if I've missed anything please let me know.
Rough benchmarks
These are run with the path being my home directory, which consists of (per erd) 11650 directories, 124225 files, and 132 links. The command run is time erd -l --no-config -L 2 ~ for both cases, and all times are averaged over 5 runs.
Previously, the unix extended attributes are always read no matter what. This is maybe not ideal, as it is very expensive to call for files which we will not display and leads to significantly (~300x with level = 2) worse runtimes recursing large directories. This is fixed by only calling
unix::Attrs::from
when it is a file which is going to be displayed.This is my first PR here, so if I've missed anything please let me know.
Rough benchmarks
These are run with the path being my home directory, which consists of (per
erd
) 11650 directories, 124225 files, and 132 links. The command run istime erd -l --no-config -L 2 ~
for both cases, and all times are averaged over 5 runs.Before
After