diff options
author | Junio C Hamano <junkio@cox.net> | 2007-03-09 03:52:12 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-11 00:04:05 -0800 |
commit | b867092fec81c59a35337d24d2d976ab2acc2488 (patch) | |
tree | 725b45968dca3c4c40eea4e8674cf4eeb5808ce8 /cache.h | |
parent | 8a3fbdd9e6c37c74b12fd0e8bd7cde8372861288 (diff) | |
download | git-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |