author | Junio C Hamano <junkio@cox.net> | |
Fri, 9 Mar 2007 11:52:12 +0000 (03:52 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 11 Mar 2007 08:04:05 +0000 (00:04 -0800) | ||
commit | b867092fec81c59a35337d24d2d976ab2acc2488 | |
tree | 725b45968dca3c4c40eea4e8674cf4eeb5808ce8 | tree | snapshot |
parent | 8a3fbdd9e6c37c74b12fd0e8bd7cde8372861288 | commit | diff |
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>
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>
cache.h | diff | blob | history | |
sha1_file.c | diff | blob | history |