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

Improve package loadable #16237

Merged
merged 5 commits into from
Aug 28, 2018
Merged

Improve package loadable #16237

merged 5 commits into from
Aug 28, 2018

Conversation

balloob
Copy link
Member

@balloob balloob commented Aug 28, 2018

Description:

Started digging deeper into the package loadable code. In my dev environtment running in a virtualenv, which has ~200 packages, 0.5 of 0.74 seconds startup time were spend inside package_loadable 🤕

Added a cache and moving most checks into the event loop, we're doing a ton less I/O now and it's down to 0.04s on my machine, x12 improvement to check if packages need to be installed! If you are running Home Assistant from a slower disk, I expect an even better boost.

Now on my machine: Home Assistant initialized in 0.44s 😎

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from a team as a code owner August 28, 2018 09:20
@ghost ghost assigned balloob Aug 28, 2018
@ghost ghost added the in progress label Aug 28, 2018
Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

Good work!

@balloob balloob merged commit 09dc4d6 into dev Aug 28, 2018
@ghost ghost removed the in progress label Aug 28, 2018
@balloob balloob deleted the improve-package-loadable branch August 28, 2018 10:52
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants