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

Extend PutLayer to optimize reusing data from existing layers #1830

Merged
merged 2 commits into from
Feb 14, 2024

Commits on Feb 13, 2024

  1. Optimize digest computation for uncompressed layers

    When the caller provides neither OriginalDigest nor
    UncompressedDigest, only digest the layer once.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    52ab5bf View commit details
    Browse the repository at this point in the history
  2. Add LayerOptions.OriginalSize

    This allows us to correctly set (CompresedDigest, CompressedSize)
    when copying data from another layer; in that case we don't have the
    compressed data, so computing the size from compressedCounter
    sets an incorrect value.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    2ca0e27 View commit details
    Browse the repository at this point in the history