robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
303 stars 61 forks source link

[HA 2024.4] blocking event loop at startup up #606

Closed Mariusthvdb closed 3 months ago

Mariusthvdb commented 3 months ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

Environment

Describe the bug

Debugging startup process in HomeAssisant with core dev BDraco and running asyncio debug on the Profiler reveals below logging.

anything above 0.05 needs to be inspected, and VWcarnet is on the list

Steps to Reproduce

just startup and run profiler

Expected behavior

Screenshots

Traceback/Error logs

Executing <Task finished name='volkswagencarnet - Golf - refresh' coro=<DataUpdateCoordinator._handle_refresh_interval() done, defined at /usr/src/homeassistant/homeassistant/helpers/update_coordinator.py:255> result=None created at /usr/src/homeassistant/homeassistant/util/async_.py:35> took 0.132 seconds

Debug information - all JSON responses from logfile

Additional context

we can force the executor import in the Manifest using

  "import_executor": true,

but this would be considered second best, please check with core devs how to adjust optimally.

stickpin commented 3 months ago

Thanks for pointing out. The flag will be added in v4.6.0