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

[PATCH 0/2] make repeated fetch faster on "read only" repos

From
Jeff King <peff@peff.net>
Date
Dec 7, 2012, 13:53 UTC
Message-ID
<20121207135351.GA10538@sigill.intra.peff.net>
Like many dev shops, we run a CI server that basically does:
  git fetch $some_branch &&
  git checkout $some_branch &&
  make test

all day long. Sometimes the fetches would get very slow, and the problem turned out to be a combination of:

  1. Never running "git gc". This means you can end up with a ton of
     loose objects, or even a bunch of small packs[1].
  2. One of the loops in fetch caused us to re-scan the entire
     objects/pack directory repeatedly, proportional to the number of
     refs on the remote.

I think the fundamental fix is to gc more often, as it makes the re-scans less expensive, along with making general object lookup faster. But the repeated re-scans strike me as kind of hacky. This series tries to address both:

  [1/2]: fetch: run gc --auto after fetching
  [2/2]: fetch-pack: avoid repeatedly re-scanning pack directory
-Peff
[1] It turns out we had our transfer.unpacklimit set unreasonably low,
    leading to a large number of tiny packs, but even with the defaults,
    you will end up with a ton of loose objects if you do repeated small
    fetches.
Next: Jeff King
Message 1 of 3 in “make repeated fetch faster on "read only" repos”
  1. 0/2 make repeated fetch faster on "read only" reposJeff King, Dec 7, 2012
  2. 1/2 fetch: run gc --auto after fetchingJeff King, Dec 7, 2012
  3. 2/2 fetch-pack: avoid repeatedly re-scanning pack directoryJeff King, Dec 7, 2012

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.