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

Dont calculate buildpack layer diffIDs twice when creating a builder #1080

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

ekcasey
Copy link
Member

@ekcasey ekcasey commented Feb 17, 2021

Signed-off-by: Emily Casey ecasey@vmware.com

Summary

Provides the buildpack layer diffIDs to imgutil so imgutil can avoid recalculating them.

Builder creation without --publish is annoyingly slow for a large builder. This only saves a couple seconds for the largest paketo builder. Other performance improvements would be more impactful such as:

  • Not calculating the layer diffID at all when we know it (e.g. when we are pulling a buildpack from a buildpackage)
  • Local Layer Cache #866

But I thought I would contribute this after noticing it because it is a trivial change the preserve the existing behavior.

Output

Before

Using https://github.com/paketo-buildpacks/full-builder:

> time pack builder create bldr/full -c ./builder.toml --pull-policy=never
pack builder create bldr/full -c ./builder.toml --pull-policy=never  11.32s user 5.38s system 45% cpu 36.312 total

After

> time pack builder create bldr/full -c ./builder.toml --pull-policy=never
pack builder create bldr/full -c ./builder.toml --pull-policy=never 9.71s user 4.84s system 40% cpu 36.326 total

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

@ekcasey ekcasey requested a review from a team as a code owner February 17, 2021 22:34
@github-actions github-actions bot added this to the 0.18.0 milestone Feb 17, 2021
Signed-off-by: Emily Casey <ecasey@vmware.com>
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Feb 17, 2021
@ekcasey ekcasey force-pushed the dont-calculated-diffIDs-twice branch from 8a06932 to c519a69 Compare February 17, 2021 22:35
@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #1080 (7ac6cdb) into main (0bd1584) will not change coverage.
The diff coverage is 20.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1080   +/-   ##
=======================================
  Coverage   80.35%   80.35%           
=======================================
  Files         130      130           
  Lines        7964     7964           
=======================================
  Hits         6399     6399           
  Misses       1147     1147           
  Partials      418      418           
Flag Coverage Δ
os_linux 79.67% <20.00%> (ø)
os_macos 77.11% <20.00%> (-0.03%) ⬇️
os_windows 80.27% <20.00%> (ø)
unit 79.72% <20.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@dfreilich dfreilich merged commit 650ce05 into main Feb 18, 2021
@dfreilich dfreilich deleted the dont-calculated-diffIDs-twice branch February 18, 2021 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants