aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-09 03:52:12 -0800
committerJunio C Hamano <junkio@cox.net>2007-03-11 00:04:05 -0800
commitb867092fec81c59a35337d24d2d976ab2acc2488 (patch)
tree725b45968dca3c4c40eea4e8674cf4eeb5808ce8 /cache.h
parent8a3fbdd9e6c37c74b12fd0e8bd7cde8372861288 (diff)
downloadgit-b867092fec81c59a35337d24d2d976ab2acc2488.tar.gz
git-b867092fec81c59a35337d24d2d976ab2acc2488.tar.xz
prepare_packed_git(): sort packs by age and localness.
When accessing objects, we first look for them in packs that are linked together in the reverse order of discovery. Since younger packs tend to contain more recent objects, which are more likely to be accessed often, and local packs tend to contain objects more relevant to our specific projects, sort the list of packs before starting to access them. In addition, favoring local packs over the ones borrowed from alternates can be a win when alternates are mounted on network file systems. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index f172d02a6..75da344fd 100644
--- a/cache.h
+++ b/cache.h
@@ -372,6 +372,7 @@ extern struct packed_git {
struct packed_git *next;
struct pack_window *windows;
uint32_t *index_base;
+ time_t mtime;
off_t index_size;
off_t pack_size;
int pack_fd;