-
Notifications
You must be signed in to change notification settings - Fork 216
helm: optimise repository index loading #685
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
Conversation
Failures are due to GitHub Packages being degraded and therefore not being able to pull the libgit2 image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the degraded GitHub Packages, this looks good to me. Thanks @pjbgf 🙇
Putting this on hold until we have run it past some affected users. |
Avoid validating (and thus loading) indexes if the checksum already exists in storage. In other words, if the YAML is identical to the Artifact in storage, the reconciliation should be a no-op, and therefore can short-circuit long/heavy operations. Co-authored-by: Hidde Beydals <[email protected]> Signed-off-by: Paulo Gomes <[email protected]>
if in == nil { | ||
return false | ||
} | ||
return in.Checksum == checksum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if in == nil { | |
return false | |
} | |
return in.Checksum == checksum | |
return in != nil && in.Checksum == checksum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I do not use this for nil
checks is that when logic changes, there is a chance someone accidentally omits the in != nil
check, and introduces a panic.
Patch has been confirmed to reduce the memory usage compared to |
Avoid validating (and thus loading) indexes if the checksum already exists in storage.
In other words, if the YAML is identical to the Artifact in storage, the reconciliation should
be a no-op, and therefore can short-circuit long/heavy operations.