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

Re: How to unpack recent objects?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 16, 2010, 20:40 UTC
Message-ID
<20101216204059.GA3830@burratino>
In-Reply-To
<4D0A77A7.9080702@cfl.rr.com>
Hi Phillip,
Phillip Susi wrote:
Show 6 quoted lines
> It looks like you can use git-unpack-objects to unpack ALL objects, but
> how can you unpack only recent ones that you are likely to use while
> leaving the ancient stuff packed?  Ideally I want to unpack all file
> objects from the current commit, and a reasonable number of commit
> objects going back into the history so accessing them with checkout,
> diff, log, etc will be fast.

Have you tried the experiment? You can pack all objects and then make a few commits that do not reuse any blobs from before on top of that; then "cp -a" the repository and use "git gc --aggressive" to get one big pack as a control. Then it should be possible to time checkout, diff, log, etc[1].

It would also be interesting to know what the nature of these objects are, in case it is possible to speed things up some other way.

Jonathan

[1] My uninformed guess is that the packed version will be faster, because of cache effects among other reasons. The point of loose objects is to speed up writing objects rather than reading them. But I'd be happy to be surprised.

Previous: Phillip SusiNext: Nicolas Pitre
Message 2 of 6 in “How to unpack recent objects?”
  1. Phillip SusiDec 16, 2010
  2. Jonathan NiederDec 16, 2010
  3. Nicolas PitreDec 16, 2010
  4. Phillip SusiDec 16, 2010
  5. Jakub NarebskiDec 16, 2010
  6. Nicolas PitreDec 16, 2010

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.