Re: [PATCH v3 0/5] Avoid spawning gzip in git archive
- From
Jeff King <peff@peff.net>
- Date
- Jul 1, 2022, 16:27 UTC
- Message-ID
- <Yr8gZT6dbCpzaR9n@coredump.intra.peff.net>
- In-Reply-To
- <038r075o-5s5r-9sop-5o02-8s84428o0r54@tzk.qr>
On Fri, Jul 01, 2022 at 06:05:59PM +0200, Johannes Schindelin wrote:
> Stolee pointed out to me that objects inside pack files are also > zlib-compressed, and that measuring the speed of `git rev-list --objects > --all --count` might therefore be a better test.
That will spend quite a lot of time doing hash-lookups for each tree entry. A better raw zlib test might be:
git cat-file --batch --batch-all-objects --unordered >/dev/null
which will just dump each object, and should mostly be zlib and delta reconstruction (the --unordered is important to hit the deltas in the right order).
> And this is where things get a little messy: in the context of Git for > Windows, my local measurements indicate that zlib is better, with ~41 > seconds using zlib vs ~52 seconds using zlib-ng (but the latter has a > rather large variance).
That is a surprising slow-down between the two. I'd expect the command above to show even more pronounced results, though, as it's spending less time doing non-zlib things. But it's still just inflating (as opposed to git-archive, which is both inflating and deflating).
-Peff