-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds throttler to config pages for state entity updates #21646
Conversation
WalkthroughWalkthroughThe changes to the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Very nice 👍 My testing install w/ 15,000 entities and hass update every 50ms was completely non-functional for entities page, but with this change it is pretty good and responsive. |
Can we test this at all? Would love to lay my hands on this and see what gives. |
There's no backport planned. I'm not sure how you could test this early than before next beta. |
I do not really like this, this should be handled/throttled in the data table and not at such a high level in the config page. I'll merge it for not as it does fix an issue, and we will look at it during beta. |
I understand. It's not the clearest way. I will look into improving. |
…)" This reverts commit 00eb820.
This has been reverted as it caused issues, like missing translation updates |
Proposed change
Adds a throttler to throttle incoming state changes. This is only a problem for Home Assistant installations that do multiple state updates per second. I didn't add it everywhere hass is updated, as it needs further testing for edge cases and therefore also not for backport I guess.
This problem, better described in the issue, started with the introduction of the new tables, since they do a lot more scripting work than before. Apparently, the entity page was already slower since a few releases, since the last release the helper page is added. It slows down to the fact that lit cannot keep up rendering the bottom children of the render tree, delaying until a moment allows to render it. On those entity and helper pages, it triggers the component to recalculate the shown items and filteredItems, probably the cause of pushing the pages to lag.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
hass
property, ensuring more responsive interaction with the component.hass
instance, reducing unnecessary updates and enhancing stability.