diff options
author | Kjetil Barvik <barvik@broadpark.no> | 2009-02-09 21:54:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-09 20:59:26 -0800 |
commit | 7847892716a3c9a7b8facc076fc056ac425bcfe6 (patch) | |
tree | 623746d79fbe18a0e2d32f67dfe6bb523ca8e8be /builtin-describe.c | |
parent | 571998921d8fd4ee674545406aabb86987921252 (diff) | |
download | git-7847892716a3c9a7b8facc076fc056ac425bcfe6.tar.gz |
unlink_entry(): introduce schedule_dir_for_removal()
Currently inside unlink_entry() if we get a successful removal of one
file with unlink(), we try to remove the leading directories each and
every time. So if one directory containing 200 files is moved to an
other location we get 199 failed calls to rmdir() and 1 successful
call.
To fix this and avoid some unnecessary calls to rmdir(), we schedule
each directory for removal and wait much longer before we do the real
call to rmdir().
Since the unlink_entry() function is called with alphabetically sorted
names, this new function end up being very effective to avoid
unnecessary calls to rmdir(). In some cases over 95% of all calls to
rmdir() is removed with this patch.
Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-describe.c')
0 files changed, 0 insertions, 0 deletions