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

avoid loading config when not running migrations #7949

Merged

Conversation

memsharded
Copy link
Member

Changelog: Fix: Avoid unnecessary extra loading of conan.conf file in the version migrations check.
Docs: Omit

Discover this while investigating: #7948

We are loading the conan.conf too many times. One of them is for migrations, even if migration is not necessary, not executed, creating a ClientCache() object unnecessarily loads the config. Delayed it instantiation to avoid it.

@memsharded memsharded added this to the 1.31 milestone Oct 27, 2020
self.cache = ClientCache(cache_folder, out)
super(ClientMigrator, self).__init__(self.cache.cache_folder, self.cache.store,
current_version, out)
self.cache_folder = cache_folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, cache_folder can't be None, because ConanAPI forces an object.

@memsharded memsharded merged commit 0fa009a into conan-io:develop Oct 28, 2020
@memsharded memsharded deleted the feature/avoid_config_load_migration branch October 28, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants