Today, we always create an ephemeral builder, because we assume that it's an inexpensive operation if nothing changed.
When containerd storage is enabled, we can no longer omit base layers for images when saving (see https://github.com/buildpacks/imgutil/pull/222#discussion_r1372167387). This unfortunately makes creating ephemeral builders expensive. We should only do this when it's absolutely necessary.
Proposed solution
Return the original builder if no buildpacks were added, order was not modified, etc.
Description
Today, we always create an ephemeral builder, because we assume that it's an inexpensive operation if nothing changed.
When containerd storage is enabled, we can no longer omit base layers for images when saving (see https://github.com/buildpacks/imgutil/pull/222#discussion_r1372167387). This unfortunately makes creating ephemeral builders expensive. We should only do this when it's absolutely necessary.
Proposed solution
Return the original builder if no buildpacks were added, order was not modified, etc.
Describe alternatives you've considered
Additional context