Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libimage: speed up image filters #811

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

vrothberg
Copy link
Member

With commit 86afb94 the dangling checks have been changed to be
compatible with Docker. Since then, the dangling also need to compute
children.

Speed up the dangling and intermediate checks by computing the layer
tree once instead of for each filter invocation.

Before:
real 0m10.837s
user 0m11.308s
sys 0m4.231s

After:
real 0m0.476s
user 0m0.478s
sys 0m0.151s

Context: github.com/containers/podman/issues/11997
Signed-off-by: Valentin Rothberg [email protected]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 19, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vrothberg
Copy link
Member Author

@rhatdan PTAL

With commit 86afb94 the dangling checks have been changed to be
compatible with Docker.  Since then, the dangling also need to compute
children.

Speed up the dangling and intermediate checks by computing the layer
tree *once* instead of for each filter invocation.

**Before:**
real    0m10.837s
user    0m11.308s
sys     0m4.231s

**After:**
real    0m0.476s
user    0m0.478s
sys     0m0.151s

Context: github.com/containers/podman/issues/11997
Signed-off-by: Valentin Rothberg <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Oct 19, 2021

LGTM
@flouthoc @nalind @giuseppe PTAL

@nalind
Copy link
Member

nalind commented Oct 19, 2021

It's a little surprising that we call a function that checks a value that's in the caller's scope, but which is never referenced outside of the function, but if the tests pass, the tests pass.

@rhatdan rhatdan added the lgtm label Oct 19, 2021
@openshift-merge-robot openshift-merge-robot merged commit da56e47 into containers:main Oct 19, 2021
@vrothberg vrothberg deleted the fix-podman-11997 branch October 20, 2021 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants