author | Junio C Hamano <junkio@cox.net> | |
Mon, 11 Jul 2005 07:00:55 +0000 (00:00 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Mon, 11 Jul 2005 17:13:09 +0000 (10:13 -0700) | ||
commit | ab90ea5d6e6ef358c8ee5869307c33a939be0e66 | |
tree | cb5ca0a9593d744fdf12ef5fec122525b0821d71 | tree | snapshot |
parent | 013aab8265a806c8d3c9b040485839091bca30f4 | commit | diff |
[PATCH] Check packs and then files.
This reverses the order of object lookup, to check pack index first and
then go to the filesystem to find .git/objects/??/ hierarchy.
When most of the objects are packed, this saves quite many stat() calls
and negative dcache entries; while the price this approach has to pay is
negligible, even when most of the objects are outside pack, because
checking pack index file is quite cheap.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This reverses the order of object lookup, to check pack index first and
then go to the filesystem to find .git/objects/??/ hierarchy.
When most of the objects are packed, this saves quite many stat() calls
and negative dcache entries; while the price this approach has to pay is
negligible, even when most of the objects are outside pack, because
checking pack index file is quite cheap.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sha1_file.c | diff | blob | history |