From b867092fec81c59a35337d24d2d976ab2acc2488 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 9 Mar 2007 03:52:12 -0800 Subject: 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 --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index f172d02a65..75da344fdc 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; -- cgit v1.2.3