15 ms·
That reflinks the files, which should get you the space savings, but I'm pretty sure that that still has to recursively copy every file in the directory, which
by gucci-on-fleek 5mo ago
That reflinks the files, which should get you the space savings, but I'm pretty sure that that still has to recursively copy every file in the directory, which can be fairly slow if you have tens of thousands of files, whereas btrfs snapshots can reflink the directory itself, so it should be faster.
Buy yeah, this should be equivalent in most cases, since I can't imagine that many Git repos have enough files for the difference to be noticeable.
- _flux 5mo agoI don't have a reflink-able filesystem in this host, but I just tested that echo 2 | sudo tee /proc/sys/vm/drop_caches time cp -rl foo bar took 2.6 seconds for 273000 files, so I think it's highly manageable. Reflinking might be a bit slower than hardlinking, though.