"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: reuse deltas while packing
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
Ted Bullock <tbullock@comlore.com>, gameoftrees@openbsd.org
Date:
Sun, 6 Feb 2022 11:54:20 +0100

Download raw body.

Thread
On Sun, Feb 06, 2022 at 01:11:47AM +0100, Christian Weisgerber wrote:
> Ted Bullock:
> 
> > I wasn't really clear on what operations would test this.
> 
> Compressing loose objects into pack files, e.g. turning this...
> 
> $ gotadmin info 
> repository: /home/naddy/src.git
> pack files: 12
> packed objects: 2077644
> packed total size: 1.3G
> loose objects: 599
> loose total size: 2.0M
> 
> ... into 13 pack files and 0 loose objects.
> 
> I cloned a pristine copy of FreeBSD src.git, and I'm currently
> exploding the pack file with "git unpack-objects" into a few million
> loose objects.  That should give me something to test.

There is no need to explode existing packs.

An easy way to test this code is to run 'gotadmin pack -a'.
That will create a new pack which contains every object that is reachable
by some reference. Any deltas found in existing pack files will be re-used.
To see the benefit, simply run the same command again without the patch
in place. The 'deltify' step should be slower without delta reuse.

'got send' will also trigger this code when it uploads objects that are
already packed locally.