-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
longer setup timings related to Spook integration #618
Comments
Its likely one or more of these that has the slowdown. I haven't dug through them yet though custom_components/spook/ectoplasms/automation/repairs/unknown_area_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/automation/repairs/unknown_device_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/automation/repairs/unknown_entity_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/automation/repairs/unknown_service_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/group/repairs/unknown_members.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/integration/repairs/unknown_source.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/proximity/repairs/unknown_ignored_zones.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/proximity/repairs/unknown_tracked_entities.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/proximity/repairs/unknown_zone.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/scene/repairs/unknown_entity_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/script/repairs/unknown_area_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/script/repairs/unknown_device_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/script/repairs/unknown_entity_references.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/switch_as_x/repairs/unknown_source.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/trend/repairs/unknown_source.py: async def async_inspect(self) -> None:
custom_components/spook/ectoplasms/utility_meter/repairs/unknown_source.py: async def async_inspect(self) -> None: |
Looking at them, the answer may be that they are going to be expensive and thats just the way it is. Inspect could probably be deferred to happen after the started event though (if it doesn't already) |
They run after the started event, (repairs are not attached before that) as before that, they don't have much use to run (integrations aren't loaded). They might be expensive at times, and I am sure optimizations are still possible. They should (individually) only run if possible data of interest changes for each of them. Eg, when a new integration loads, and automation changes, registry updates and things like that. As those events can rapidly follow up on each other, they are debounced. |
Looking at the look Marius sent: They happen after This one seems lower priority to optimize |
I experienced exactly the same thing based on turning on I had three updates from spook that I still did not add as I was waiting for another reason to restart my system (enabling debugpy was that reason). @bdraco has my logs from the slow startup, if you want to confirm the same issues or not? |
Honestly... it is not an issue :) |
Oh that makes tons of sense, let me fix that quickly. |
Just fyi, the above findings are with the 3 devices disabled, Spook is only enabled because of the need for its services dis/enable config_entry. |
@Mariusthvdb These are not related to the devices Spook creates. These are the repair inspections. |
What version of Spook are you using?
2.2.1
What version of Home Assistant are you using?
2024.2.x
The problem
running debugpy on Bdraco request reveals several integrations reporting longer setup timings.
Per request, I report those in separate issues, here the ones mentioning Spook
maybe its not caused by Spook, and it is in fact a HA issue, please close then and Ill report in Ha.
Anything in the logs? Paste it here!
The text was updated successfully, but these errors were encountered: