4 ms·
As Rob mentions in his post, the more dotfiles there are in $HOME the slower path resolution for any subfiles becomes. How do we navigate to ./src? We open the
by lubutu 14y ago
As Rob mentions in his post, the more dotfiles there are in $HOME the slower path resolution for any subfiles becomes. How do we navigate to ./src? We open the directory and read all the entries until we find the one called "src". What happens if we encounter a morass of dotfiles beforehand? src takes a while to find. The clutter may be invisible to you, but it does gum up the works.
- duaneb 14y agoUnless you have many thousands of files, I can't imagine you would ever notice a slowdown.
- kbolino 14y agoFor what it's worth, most modern file systems (JFS, XFS, ext4, reiserfs, btrfs, ...) have logarithmic (or better) directory lookup times. This is achieved using hashes and b-trees (or even hash tables).
- lubutu 14y agoFair point. Though anything using the standard POSIX dirent API would still get the performance hit (even if path resolution doesn't).