Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cache repo instances to reduce nb of external cmds
With the current design of kas, the repo instances are created on-the-fly, as the repo configuration can be changed (overridden) with new configs from include files. As this happens during the checkout of the repositories, all repos need to be re-created after each config update iteration. This even affects the case when plugins access the repos just for evaluation. During the creation of the repo instances, shell commands are executed that both leave traces in the kas log, as well are potentially costly on big repositories. As the whole repo creation logic cannot be changed without a major refactoring, this patch introduces a cache for repo instances. There, the whole set of input arguments is hashed and repos that did not get updated are returned from the cache instead of being reconstructed. This makes the output much more readable (50% less lines on some layers). Signed-off-by: Felix Moessbauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
- Loading branch information