core: unifi/controller.py took 1.502 seconds

The problem

running debugpy to find why cpu is swarmed at startup reveals this to take a very long time.

writing issue per request

What version of Home Assistant Core has the issue?

2024.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unifi

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-02-12 18:10:47.387 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-19665' coro=<UniFiController.start_websocket.<locals>._websocket_runner() running at /usr/src/homeassistant/homeassistant/components/unifi/controller.py:384> wait_for=<Future pending cb=[Task.task_wakeup()] created at /usr/local/lib/python3.12/asyncio/base_events.py:447> created at /usr/src/homeassistant/homeassistant/components/unifi/controller.py:391> took 1.502 seconds

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 16 (15 by maintainers)

Most upvoted comments

https://github.com/Kane610/aiounifi/blob/051101063bee5da76fbb90e3e0259ebf179c49a6/aiounifi/interfaces/connectivity.py#L173 these could be identity checks instead of equality checks… but even than I don’t think that makes much difference