From 4929e37507b530cb1d0e92cfcd252b0abefb4f2f Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 19 Feb 2018 08:40:43 -0600 Subject: Performance enhancement for podman images Previous code was using slow routines to collect some of the information needed to output images. Specifically size was being calculated instead of using the cached, already known size already available. Also, straight- lined several of the code paths. Overall assessment is that these improvements cut the time for images in half. Signed-off-by: baude Closes: #365 Approved by: mheon --- pkg/inspect/inspect.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg') diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go index e523d4c4d..806692425 100644 --- a/pkg/inspect/inspect.go +++ b/pkg/inspect/inspect.go @@ -202,3 +202,18 @@ type NetworkSettings struct { IPv6Gateway string `json:"IPv6Gateway"` MacAddress string `json:"MacAddress"` } + +// ImageResult is used for podman images for collection and output +type ImageResult struct { + Tag string + Repository string + RepoDigests []string + RepoTags []string + ID string + Digest digest.Digest + ConfigDigest digest.Digest + Created time.Time + Size *uint64 + Labels map[string]string + Dangling bool +} -- cgit v1.2.3-54-g00ecf