I was running a profiler against HA (investigating another issue) and saw that tplink_ess is taking a lot of the execution time:
The sector highlighted in purple is this integration, which makes many calls (during the 60 second profiling)
Looking into the code, and adding some debugging, I can see that the integration polls each configured switch every 10-30 seconds. Each time it calls update_data() this polls all the actions, which takes over a second:
2023-04-26 13:58:01.350 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a hostname
2023-04-26 13:58:01.453 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a num_ports
2023-04-26 13:58:01.538 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a ports
2023-04-26 13:58:01.638 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a trunk
2023-04-26 13:58:01.724 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a mtu_vlan
2023-04-26 13:58:01.813 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a vlan
2023-04-26 13:58:01.899 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a pvid
2023-04-26 13:58:01.988 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a qos1
2023-04-26 13:58:02.099 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a qos2
2023-04-26 13:58:02.200 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a mirror
2023-04-26 13:58:02.289 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a stats
2023-04-26 13:58:02.453 INFO (MainThread) [tplink_ess_lib] QUERY b4:b0:24:3a:ec:3a loop_prev
Most of this data is unnecessary.
Version of the custom_component
git Wed Mar 1
Configuration
In the profiler pictures above, THREE tp-link ESS switches are configured.
I was running a profiler against HA (investigating another issue) and saw that tplink_ess is taking a lot of the execution time:
The sector highlighted in purple is this integration, which makes many calls (during the 60 second profiling)
Looking into the code, and adding some debugging, I can see that the integration polls each configured switch every 10-30 seconds. Each time it calls update_data() this polls all the actions, which takes over a second:
Most of this data is unnecessary.
Version of the custom_component
git Wed Mar 1
Configuration
In the profiler pictures above, THREE tp-link ESS switches are configured.