author | Junio C Hamano <junkio@cox.net> | |
Sun, 18 Sep 2005 08:01:07 +0000 (01:01 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 18 Sep 2005 08:01:07 +0000 (01:01 -0700) | ||
commit | 85d106c267ec26f398e0aaf352d8011f661c459a | |
tree | 6d87bbb0997df33a5e08f18e301962bb2a047cd5 | tree | snapshot |
parent | 490e23d22afad5734daa447f1a991eeff3a669bb | commit | diff |
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>
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>
fetch.c | diff | blob | history |