This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache loaded images for performance improvements. (#1934)
Locally on ubuntu 18.04, the join_layers step takes greater than 30 seconds for the container_bundle_with_install_pkgs target without this change, and ~5 seconds with this change. With the previous implementation, join_layers was passing the same set of images to reader.parts for each call to ReadImage. The reader, created fresh for each call to ReadImage, would then load these same images again. This results in a fixed cost for every image you add to the bundle. For large bundles, this can be very costly (on the order of minutes). Updated other callers of compat.ReadImages to use this new API of creating a reader first, then calling reader.ReadImage. Co-authored-by: aptenodytes-forsteri <aptenodytesforstericodes@gmail.com>
- Loading branch information
1 parent
3929701
commit debc18a
Showing
6 changed files
with
84 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters