Create component setup tasks eagerly in bootstrap (#111511)

This saves waiting one iteration of the event loop
pull/111574/head^2
J. Nick Koston 2024-02-26 18:45:55 -10:00 committed by GitHub
parent d5e1934942
commit 145ce183d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -622,7 +622,9 @@ async def async_setup_multi_components(
domains_not_yet_setup = domains - hass.config.components
futures = {
domain: hass.async_create_task(
async_setup_component(hass, domain, config), f"setup component {domain}"
async_setup_component(hass, domain, config),
f"setup component {domain}",
eager_start=True,
)
for domain in domains_not_yet_setup
}