AppDaemon 4.0.1 - performance problems

Yesterday I upgraded from AppDaemon 3.0.5 to 4.0.1 and while the upgrade itself went smooth thanks to the excellent docs, I had to rollback because of performance problems.

I use appdaemon to switch my lights and with 3.0.5, it works excellent. After the upgrade to 4.0.1 though, when I pushed a wall switch, it sometimes took 3 to 5 seconds before the actual light went on. This is in contrast too AppDaemon 3 where the light responded instantly.

Any idea what may be causing this?

How are you running appdaemon? Docker, venv etc?
Anything in the appdaemon logs?

I’m using appdaemon 4.0.1 and my lights are working instantly.
Have you tried commenting out parts of your code to.see if anything in particular is slowing it down?

My upgrade to 4.0.x went fairly smoothly as well, and I don’t see any difference in response speed. If you haven’t already, check out the log and error log to make sure that nothing bad is happening. I had an AD app that I wrote to publish appdaemon logs to the main HA log, but I found a better way to do that and just left the app active, but dormant. Something in that super-simple app caused a flood of errors and brought AD to its knees until I explicitly disabled it.

v4 uses a lot more CPU than v3. On mine it went from using 1.49% CPU to using 4.21%. All and all, it’s still small :slight_smile:

Now since the upgrade I’ve done more stuff and it’s at 5.26%.

Seems strange because because HASS only uses 2.18% which is less than a year ago when it used 2.30%. I would expect HASS to use more than AD considering it seems to do more of the heavy lifting.

These stats are from an i3-4010U

I’m running AppDaemon in Docker on a Synology NAS (on a x86 CPU). The strange thing: sometimes the lights respond instantly, sometimes it takes over 5 seconds. I don’t think there were errors, but I’ll double check (not at home for the moment).

For the moment, I rolled back to 3.0.5 and all is well again.