When mirroring, write content directly, do not verify
authorColin Walters <walters@verbum.org>
Sun, 1 Feb 2015 16:09:47 +0000 (11:09 -0500)
committerColin Walters <walters@verbum.org>
Fri, 6 Feb 2015 02:24:21 +0000 (21:24 -0500)
commitfab1e113db558cb7d6754e243919558df92d4864
treed084f98c285d9c6c25e534992209c11262f3ea64
parent247866a9bca3557fb4a22a772a034eb89682b6a3
When mirroring, write content directly, do not verify

When doing a pull --mirror from an archive-z2 repository into another
archive-z2 repository, currently we gunzip/checksum/gzip each content
object.  The re-gzip process in particular is fairly expensive.

This does assume that the upstream content is trusted and correct.
It'd be nice in the future to do at least a CRC check, if not the full
checksum.  (Could we append CRC data to the end of filez objects?)

We could also choose to only do this optimization if fetching over
TLS.

before: 1626 metadata, 20320 content objects fetched; 299634 KiB transferred in 62 seconds
after : 1626 metadata, 20320 content objects fetched; 299634 KiB transferred in 11 seconds
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-pull.c
tests/test-pull-mirror-summary.sh