-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Add --skip-refresh
flag to the build command
#444
Conversation
@indrekj Please fix DCO issue. |
This improves the `helmfile sync` performance. From the code: `BuildDeps` is used only by `runHelmDepBuilds`, which only is used by `PrepareCharts` which is finally only used by `withPreparedCharts`. `withPreparedCharts` already does `SyncReposOnce` which means we do not have to refresh the local repository cache on each chart build. This is only supported in Helm v3. This seems to be mostly affecting helmfiles which have a lot of releases and those release charts use sub dependencies. I saw significant performance improvements for a helmfile with 45 releases, 2 repositories, and most of the charts also had their own dependencies. Results: Before the patch: * real 9m10.565s * real 9m38.335s * real 9m14.941s * real 5m13.106s (with cache) After the patch: * real 6m51.965s * real 6m36.605s * real 6m31.685s * real 3m0.271s (with cache) These were tested with: ``` rm -rf ~/.cache/helmfile ~/.cache/helm ~/.config/helm/repositories.* && helmfile sync ... ``` The result with `(with cache)` was without deleting the caches first. From these metrics it seems that the sync duration decreased 20-45% depending on the run, release count, dependencies and if the cache was used or not. As far as I understand, this should be backward-compatible change. Signed-off-by: Indrek Juhkam <indrek@urgas.eu>
Fixed, and fixed a test issue as well. The next run should be green now. |
@indrekj I have a question. why not add the skip-refresh option? from the logic. it will add --the skip-refresh option by default when helm v3. |
To my understanding, there's no need to do a refresh if we're already doing |
@indrekj oh. I see. |
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.
LGTM
Seems good to me. Thanks for your proposal and contribution! |
Discussion: #426
This improves the
helmfile sync
performance.From the code:
BuildDeps
is used only byrunHelmDepBuilds
, which only is used byPrepareCharts
which is finally only used bywithPreparedCharts
.withPreparedCharts
already doesSyncReposOnce
which means we do not have to refresh the local repository cache on each chart build.This is only supported in Helm v3.
This seems to be mostly affecting helmfiles which have a lot of releases and those release charts use sub dependencies.
I saw significant performance improvements for a helmfile with 45 releases, 2 repositories, and most of the charts also had their own dependencies. Results:
Before the patch:
After the patch:
These were tested with:
The result with
(with cache)
was without deleting the caches first.From these metrics it seems that the sync duration decreased 20-45% depending on the run, release count, dependencies and if the cache was used or not.
As far as I understand, this should be backward-compatible change.