diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-18 01:01:07 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-18 01:01:07 -0700 |
commit | 85d106c267ec26f398e0aaf352d8011f661c459a (patch) | |
tree | 6d87bbb0997df33a5e08f18e301962bb2a047cd5 /send-pack.c | |
parent | Archive-destroying "git repack -a -d" bug. (diff) | |
download | tgif-85d106c267ec26f398e0aaf352d8011f661c459a.tar.xz |
Improve the safety check used in fetch.c
The recent safety check to trust only the commits we have made
things impossibly slow and turn out to waste a lot of memory.
This commit fixes it with the following improvements:
- mark already scanned objects and avoid rescanning the same
object again;
- free the tree entries when we have scanned the tree entries;
this is the same as b0d8923ec01fd91b75ab079034f89ced91500157
which reduced memory usage by rev-list;
- plug memory leak from the object_list dequeuing code;
- use the process_queue not just for fetching but for scanning,
to make things tail recursive to avoid deep recursion; the
deep recursion was especially prominent when we cloned a big
pack.
- avoid has_sha1_file() call when we already know we do not have
that object.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'send-pack.c')
0 files changed, 0 insertions, 0 deletions