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
Significantly reduce overhead to filter event triggers #99376
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
This one is slow enough to impact the UI and be a major contributing factor to integrations triggering the slow update warning. Will tag for beta and undraft after running it on production for a bit. |
* fast * cleanups * cleanups * cleanups * comment * comment * add more cover * comment * pull more examples from forums to validate cover
Proposed change
The large number of
vol.Schema
validate_mapping
calls was contributing to sluggish performance and poor response times. In most cases we can avoid it and do a simpledict
.items()
compare. For complex nested cases, continue to fallback to the expensivevol.Schema
validate_mapping
path (these should be rare and there are much better ways to write the automations already available).profile courtesy of @Madelena
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: