improve performance issue fetching all the states #2218
Replies: 2 comments 10 replies
-
I don't see how this can be optimized, except introducing some throtteling, i.e. only handle update ones every X seconds, and not on every state change of a group member entity. This is similar as all the core group helpers are implemented, they also fetch all individual member states on every state change of one of the group entities. State fetches are also very cheap as they are just getting a single key from a dictionary, which is a highly optimized data structure in python. When you have a lot of group sensors, which in turn consists of many member entities it's expected to react to a lot of state changes, which cause all the get calls on dictionary. |
Beta Was this translation helpful? Give feedback.
-
Nick checked my profiler files, and reported this is much better indeed, so mission accomplished I would say. thank you for taking the time to do this. |
Beta Was this translation helpful? Give feedback.
-
Hi Bram,
after inspecting my HA instance, Powercalc integration turned out to be one of the most intense of the system... Please check what Nick (BDraco) mentions about the way it gets its data and manipulates that. Would be very interesting to see (and experience) if that could be changed for the better.
graphical:
Beta Was this translation helpful? Give feedback.
All reactions