summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-08 07:14:37 -0400
committerGitHub <noreply@github.com>2020-08-08 07:14:37 -0400
commit3173a18f6f97ddb684230296054216b526a54f0e (patch)
treea75b3cb153d308097c97470aa0958929cab88c22 /pkg/domain
parent1298161ae47a77ba2666903a30ae080710b00f9c (diff)
parent8827100b98d0e8afa6cd7a8d7415cb748948a417 (diff)
downloadpodman-3173a18f6f97ddb684230296054216b526a54f0e.tar.gz
podman-3173a18f6f97ddb684230296054216b526a54f0e.tar.bz2
podman-3173a18f6f97ddb684230296054216b526a54f0e.zip
Merge pull request #7215 from vrothberg/flatten-the-curve
images: speed up lists
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/images_list.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go
index 11e2ddb39..7ec84246d 100644
--- a/pkg/domain/infra/abi/images_list.go
+++ b/pkg/domain/infra/abi/images_list.go
@@ -13,6 +13,14 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
return nil, err
}
+ if !opts.All {
+ filter, err := ir.Libpod.ImageRuntime().IntermediateFilter(ctx, images)
+ if err != nil {
+ return nil, err
+ }
+ images = libpodImage.FilterImages(images, []libpodImage.ResultFilter{filter})
+ }
+
summaries := []*entities.ImageSummary{}
for _, img := range images {
var repoTags []string
@@ -32,15 +40,6 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
if err != nil {
return nil, err
}
- if len(img.Names()) == 0 {
- parent, err := img.IsParent(ctx)
- if err != nil {
- return nil, err
- }
- if parent {
- continue
- }
- }
}
digests := make([]string, len(img.Digests()))