mirror of
https://github.com/containers/skopeo.git
synced 2025-09-24 03:17:17 +00:00
vendor: update containers/storage and containers/image
some tests I've done to try out the difference in performance: I am using a directory repository so to not depend on the network. User time (seconds): 39.40 System time (seconds): 6.83 Percent of CPU this job got: 121% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:38.07 User time (seconds): 8.32 System time (seconds): 1.62 Percent of CPU this job got: 128% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:07.72 User time (seconds): 42.68 System time (seconds): 6.64 Percent of CPU this job got: 162% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:30.44 User time (seconds): 8.94 System time (seconds): 1.51 Percent of CPU this job got: 178% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.85 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/storage/layers.go
generated
vendored
8
vendor/github.com/containers/storage/layers.go
generated
vendored
@@ -2,7 +2,6 @@ package storage
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -20,6 +19,7 @@ import (
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
"github.com/containers/storage/pkg/system"
|
||||
"github.com/containers/storage/pkg/truncindex"
|
||||
"github.com/klauspost/pgzip"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/pkg/errors"
|
||||
@@ -1055,7 +1055,7 @@ func (r *layerStore) Diff(from, to string, options *DiffOptions) (io.ReadCloser,
|
||||
}
|
||||
defer tsfile.Close()
|
||||
|
||||
decompressor, err := gzip.NewReader(tsfile)
|
||||
decompressor, err := pgzip.NewReader(tsfile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1116,9 +1116,9 @@ func (r *layerStore) ApplyDiff(to string, diff io.Reader) (size int64, err error
|
||||
defragmented := io.TeeReader(io.MultiReader(bytes.NewBuffer(header[:n]), diff), compressedCounter)
|
||||
|
||||
tsdata := bytes.Buffer{}
|
||||
compressor, err := gzip.NewWriterLevel(&tsdata, gzip.BestSpeed)
|
||||
compressor, err := pgzip.NewWriterLevel(&tsdata, pgzip.BestSpeed)
|
||||
if err != nil {
|
||||
compressor = gzip.NewWriter(&tsdata)
|
||||
compressor = pgzip.NewWriter(&tsdata)
|
||||
}
|
||||
metadata := storage.NewJSONPacker(compressor)
|
||||
uncompressed, err := archive.DecompressStream(defragmented)
|
||||
|
Reference in New Issue
Block a user