BenPru / luxtronik

Luxtronik integration for Home Assistant
MIT License
66 stars 23 forks source link

unusual number of luxtronik2_data_update listener2 #224

Open AJediIAm opened 6 months ago

AJediIAm commented 6 months ago

I noticed that under Developer Tools > Events, the luxtronik2_data_update event has 25 listeners. This is noticable because:

While many integrations need to listen for updates, none of them seem to use their own event handler and none of them have so many listeners. The developer documentation state attributed events should be used instead. I expect that using events like most other integrations will improve UI responsiveness template sensors updates and overall stability and performance.

The Luxtronik integration heavily impacts the performance, responsiveness and stability of the entire Home Assistant platform. Disabling the integration has a noticable positive impact. My theory is that the non-standard use of events contributes to this. I doubt the use of custom event listeners is acceptable for a native HA integration (assuming this is still a goal for this integration).

Proposal:

BenPru commented 6 months ago

This is old code and I can remove it next time. But it is never fired so it can not have an big impact. And in future release I would like to use events and I have to re add it.