[PATCH 0/2] optimizing pack access on "read only" fetch repos
- From
Jeff King <peff@peff.net>
- Date
- Jan 26, 2013, 22:40 UTC
- Message-ID
- <20130126224011.GA20675@sigill.intra.peff.net>
This is a repost from here:
http://thread.gmane.org/gmane.comp.version-control.git/211176
which got no response initially. Basically the issue is that read-only repos (e.g., a CI server) whose workflow is something like:
git fetch $some_branch && git checkout -f $some_branch && make test
will never run git-gc, and will accumulate a bunch of small packs and loose objects, leading to poor performance.
Patch 1 runs "gc --auto" on fetch, which I think is sane to do.
Patch 2 optimizes our pack dir re-scanning for fetch-pack (which, unlike the rest of git, should expect to be missing lots of objects, since we are deciding what to fetch).
I think 1 is a no-brainer. If your repo is packed, patch 2 matters less, but it still seems like a sensible optimization to me.
[1/2]: fetch: run gc --auto after fetching [2/2]: fetch-pack: avoid repeatedly re-scanning pack directory
-Peff