git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] prepare_packed_git(): sort packs by age and localness.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 11, 2007, 03:07 UTC
Message-ID
<7vps7gxyu6.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070311023422.GE10343@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 18 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
>> 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.
>
> ACK.  But...
>  
>> diff --git a/cache.h b/cache.h
>> @@ -431,6 +432,7 @@ extern off_t find_pack_entry_one(const unsigned char *, struct packed_git *);
>> +void rearrange_packed_git(void);
>
> Is that really necessary to make public?

The next patch in the series was going to sort in a different order (giving it a parameter to control the sort order) that is more suitable while repacking, but it seems that the patch is not needed.

Previous: Shawn O. Pearce
Message 3 of 3 in “prepare_packed_git(): sort packs by age and localness.”
  1. prepare_packed_git(): sort packs by age and localness.Junio C Hamano, Mar 11, 2007
  2. Shawn O. PearceMar 11, 2007
  3. Junio C HamanoMar 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.