Open tlanfer opened 22 hours ago
Alright i checked for other issues of the same problem earlier today, and in the time between me checking earlier and me creating the issue just now, someone created #483
Thank you for your investigation
Maybe this is also the origin of my issue.
Hey, I haven't had time to dive deep into the details, but I think this is related to an issue where all displayed elements are re-rendered even if there is no ‘change’. This happens when something in the hass object changes. I'm not 100% sure, but since an update to the home assistant, I get a time update 2 times a minute, so the cards were forced to re-render because there was a change. Watching the hass object for changes is required when you change the theme, language or dark/light mode. The current fix now looks more closely at the changes and whether or not they contain changes relevant to the TrashCard. This should greatly reduce the rendering time. I have also changed the implementation of how the containers are initialised so that only the relevant information, such as time etc., is updated instead of the entire cards. I think this will even solve the memory leak issue, if not i will have closer look. Please let me know if the new release (2.4.5) will solve the issue or not.
Hey, I haven't had time to dive deep into the details, but I think this is related to an issue where all displayed elements are re-rendered even if there is no ‘change’. This happens when something in the hass object changes. I'm not 100% sure, but since an update to the home assistant, I get a time update 2 times a minute, so the cards were forced to re-render because there was a change. Watching the hass object for changes is required when you change the theme, language or dark/light mode. The current fix now looks more closely at the changes and whether or not they contain changes relevant to the TrashCard. This should greatly reduce the rendering time. I have also changed the implementation of how the containers are initialised so that only the relevant information, such as time etc., is updated instead of the entire cards. I think this will even solve the memory leak issue, if not i will have closer look. Please let me know if the new release (2.4.5) will solve the issue or not.
Thanks for the fix.
I'm just waiting for it to popup in HACS.
A workaround otherwise is to use v. 2.4.0. This also looks stable.
A quick test on my desktop looks good. I just added the card back on my tablets dashboard, and will report back soon if the memory usage is stable.
Requirements
Current Behavior
I'm running fully kiosk browser with a home assistant dashboard on a lenovo tablet in the hallway, showing some useful information like the trash collection schedule. I noticed regularly, the app would close. looking at the "free memory" statistics from fully kiosk, it showed that the memory would get eaten up rather quickly. Comparing the dashboard with another tablet i am using, the main difference was the hassio-trash-card. Watching a the builtin chrome task manager on my desktop machine, showing the same dashboard, i can watch the memory footprint grow by a few megabytes every few minutes.
Removing the trash card makes this behavior stop. I attached a screenshot of the statistic for "free memory". The left half was when i still had the trash card on that dashboard. the gaps are when the app was closed because android killed it for using too much memory. the right half is from after i removed the card from the dashboard.
Expected Behavior
I expected the memory to be roughly stable. I have not found the time yet to do more experiments to find out if something specific in my configuration causes this.
Steps To Reproduce
This is my card config:
The calendar is coming in through the google calendar integration
Context
YAML state
Environment
Debug data
Anything else?