From d34e2c1f1219dc7d7311fdb208670053bf34a29b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 Mar 2024 12:23:18 -1000 Subject: [PATCH] Pre import webhook before asyncio starts (#112441) This one ends in stage 1 and other components have to wait for it to be imported. Its cheap to import but it ends up at the end of the line which means other end up waiting for it which is time we could be doing startup work `2024-03-04 23:13:04.347 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 1: {usb, websocket_api, webhook, zeroconf, bluetooth, ssdp, dhcp, cloud, network, api, http, hassio}` It currently always has a wait time for the import executor `2024-03-04 23:13:04.496 DEBUG (MainThread) [homeassistant.loader] Component webhook import took 0.146 seconds (loaded_executor=True)` --- homeassistant/bootstrap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 84581131edc..030099a9e2c 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -44,6 +44,7 @@ from .components import ( search as search_pre_import, # noqa: F401 sensor as sensor_pre_import, # noqa: F401 system_log as system_log_pre_import, # noqa: F401 + webhook as webhook_pre_import, # noqa: F401 websocket_api as websocket_api_pre_import, # noqa: F401 ) from .const import (