Re: serious performance issues with images, audio files, and other "non-code" data
- From
Jeff King <peff@peff.net>
- Date
- May 18, 2010, 19:41 UTC
- Message-ID
- <20100518194105.GA4723@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LFD.2.00.1005181528550.12758@xanadu.home>
On Tue, May 18, 2010 at 03:33:58PM -0400, Nicolas Pitre wrote:
Show 5 quoted lines
> > It will have to write the whole 200M packfile out each time, though. > > No. gc will only create a pack with new loose objects by default. > Only if the number of packs grow too large will it combine them into one > pack.
I think that is only "gc --auto". With regular gc:
$ git init $ echo content >file && git add file && git commit -m one $ git gc Counting objects: 3, done. Writing objects: 100% (3/3), done. Total 3 (delta 0), reused 0 (delta 0) $ du -a .git/objects/pack 4 .git/objects/pack/pack-5f6fe4b14529d73f51d7c8efa69306edd35f2302.idx 4 .git/objects/pack/pack-5f6fe4b14529d73f51d7c8efa69306edd35f2302.pack 12 .git/objects/pack
$ echo content >>file && git commit -a -m two $ git gc Counting objects: 6, done. Delta compression using up to 2 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (6/6), done. Total 6 (delta 0), reused 3 (delta 0) $ du -a .git/objects/pack 4 .git/objects/pack/pack-ecf41a1c120eb911f50fdd2c159e94d5832974f7.idx 4 .git/objects/pack/pack-ecf41a1c120eb911f50fdd2c159e94d5832974f7.pack 12 .git/objects/pack
So six objects written in the second gc, and obviously a brand new single pack.
-Peff