diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-10-08 20:03:40 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-10-08 20:03:40 -0700 |
| commit | cd4397783f7ae86de867bed3346ea10547a94ee1 (patch) | |
| tree | 4ce6a807c43bacfabee5312517ca6f35b118ad2d /test | |
| parent | 4a2cf388440f6efadf9c7664b63c3949b25d6824 (diff) | |
| download | zig-cd4397783f7ae86de867bed3346ea10547a94ee1.tar.gz zig-cd4397783f7ae86de867bed3346ea10547a94ee1.zip | |
Package.Fetch: improved deletion algorithm
Instead of every file deletion being followed by a recursive attempt to
remove the parent directory, while walking the directory, every
directory that will have nonzero files deleted from it is tracked in an
array hash map.
After all the threads have finished deleting and hashing, the parent
thread sorts the "suspicious" directories by length, descending,
ensuring that children appear before parents, and then iterates over the
array hash map, attempting a rmdir operation on each. Any rmdir that
succeeds appends the parent directory to the map so that it will be
removed if empty.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
