amaximus / garbage-collection-card

Custom Lovelace card for Garbage Collection custom component
MIT License
128 stars 24 forks source link

Slows down entire Lovelace UI #38

Closed mikalmo1 closed 4 years ago

mikalmo1 commented 4 years ago

I've configured 4 of these cards to show my different garbage-sensors. However it slows down my UI to almost a full stop. When I remove the card it is back to full speed.

amaximus commented 4 years ago

Could you please post at least one of the sensors' definition? Do you use the sensors with verbose_state=true? Do the cards load on the UI?

mikalmo1 commented 4 years ago

The cards loads in the UI, but the performance drop in UI speed is noticeable from the first card I add, then it gets aggressively worse per card I add..

sensors:

  • name: Restavfall frequency: "every-n-weeks" period: 4 collection_days:
  • thu first_week: 36 verbose_state: true verbose_format: '{date}, in {days} days' date_format: '%A %d %B'
amaximus commented 4 years ago

The strange is that by using verbose_state=true you avoid running time consuming parts of the Javascript that deal with translation as the string defined by verbose_format is taken as-is. Could you please try to flush your browser's cache and reload Lovelace. It might also help to investigate if you'd open the Javascript console to see whether there are any errors thrown (in Chrome this would be at: three_dots->More tools->Develover Tools->Console (in the top menu).

mikalmo1 commented 4 years ago

I have done all of the above. But I managed to have it run smoothly when commenting out the verbose_state. Will do some further testing later.

amaximus commented 4 years ago

Any further updates on this issue?

amaximus commented 4 years ago

No feedback, closing this issue.