thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.04k stars 169 forks source link

Extremly Slow and Stuck #359

Open milandzuris opened 4 months ago

milandzuris commented 4 months ago

HA: 2024.2+ Card Mod: 3.4.2 Logs: Clear Cache: clear Chrome Same problem on Phones

From new Update HA 2024.2+ every Card where is Customized with Card Mod extremly slow load i mean few seconds 5-20, i dont know is this problem in Card Mod or HA Frontend, or after few minutes Dashboard it gets stuck and freezes

ToViNi commented 4 months ago

Same here. Heavy use of card-mod. Complex pages. Gone from 3-4 seconds update time to a 30-60 seconds. Often the pages stops without finishing loading all elements, or finish "modding". All browsers. Good HW and network. Revert to 2024.1.x solves the problem. Profiler shows that scripting uses up "all" the time, card-mod js. Lovelace seems to be a bit slower on 2024.2.x on pages not using card-mod too, but not sure about that. HA is not eating CPU, but the browser uses a lot!

milandzuris commented 4 months ago

Same here. Heavy use of card-mod. Complex pages. Gone from 3-4 seconds update time to a 30-60 seconds. Often the pages stops without finishing loading all elements, or finish "modding". All browsers. Good HW and network. Revert to 2024.1.x solves the problem. Profiler shows that scripting uses up "all" the time, card-mod js. Lovelace seems to be a bit slower on 2024.2.x on pages not using card-mod too, but not sure about that. HA is not eating CPU, but the browser uses a lot!

I have exactly the same thing, and I'm already really dialed in, today Dashboard didn't work at all through my PC, HA is seriously unusable.

effelle commented 4 months ago

Holy crap... I'm on HA: 2024.3 and Card Mod: 3.4.2 too and I spent literally a day to try to understand what card was causing the issue. In my case I saw the browser became unresponsive until showing an out of memory issue. The server works fine as expected, just the browsers, Chromium on linux and Chrome for Windows, are killed. Didn't realize it could be a possible issue with Card Mod. As a test I replaced the customized cards (mostly mushroom) with some stock cards and the lags disappeared. I know CSS mod and templating can hammer the CPU but I think that's really too much. Here is a YAML snippet of a card causing the lag issue, perhaps @thomasloven could find some useful tip:

- type: custom:vertical-stack-in-card
  cards:
    - type: custom:mushroom-template-card
      entity: null
      icon: null
      icon_color: null
      picture: '{{ state_attr(''sensor.forecast_d5'', ''picture'') }}'
      primary: '{{ states.sensor.forecast_d5.state }}'
      secondary: '{{ state_attr(''sensor.forecast_d5'', ''condition'') }}'
      layout: vertical
      card_mod:
        style:
          mushroom-state-info$: |
            .primary {
              font-size: 22px !important;
              position: relative;
              top: -130px;
              left: 0px;
              overflow: visible !important;
              white-space: normal !important;
            }
            .secondary {
              font-size: 22px !important;
              position: relative;
              overflow: visible !important;
              top: -15px;
              left: 0px;
            }
          mushroom-shape-avatar$: |
            .picture {
              top: 16px;
              left: -50px;
              position: relative;                    
            }
          .: |
            :host {
              --mush-icon-size: 120px;
            }
    - type: custom:mushroom-template-card
      primary: '{{ state_attr(''sensor.forecast_d5'', ''temperature'') }}°C'
      icon: mdi:thermometer
      icon_color: gray
      secondary: none
      card_mod:
        style:
          mushroom-state-info$: |
            .primary {
              font-size: 15px !important;
              position: relative;
              top: 8px;
              left: 0px;
              overflow: visible !important;
              white-space: normal !important;
            }
          .: |
            ha-card {
              width: 66px;
              margin-left: 50%;
              top: -163px;
              background: none;
              text-align: right !important;
            }
            :host {
              --mush-icon-size: 35px;
            }
    - type: custom:mushroom-template-card
      primary: '{{ state_attr(''sensor.forecast_d5'', ''humidity'') }}%'
      icon: mdi:water-percent
      icon_color: gray
      secondary: none
      card_mod:
        style:
          mushroom-state-info$: |
            .primary {
              font-size: 15px !important;
              position: relative;
              top: 8px;
              left: 0px;
              overflow: visible !important;
              white-space: normal !important;
            }
          .: |
            ha-card {
              width: 66px;
              margin-left: 50%;
              top: -194px;
              background: none;
            }
            :host {
              --mush-icon-size: 35px;
            }
    - type: custom:mushroom-template-card
      primary: >-
        {{ state_attr('sensor.forecast_d5', 'rain_probability')
        }}%
      icon: mdi:weather-pouring
      icon_color: gray
      secondary: none
      card_mod:
        style:
          mushroom-state-info$: |
            .primary {
              font-size: 15px !important;
              position: relative;
              top: 8px;
              left: 0px;
              overflow: visible !important;
              white-space: normal !important;
            }
          .: |
            ha-card {
              width: 66px;
              margin-left: 50%;
              top: -225px;
              background: none;
            }
            :host {
              --mush-icon-size: 35px;
            }
  card_mod:
    style: |
      ha-card {
        height: 180px !important;
        width: 264px !important;
        --ha-card-border-width: 0;
      }

I'm really hoping the cause of the issue is my bad CSS styling... :P This card is part of a collection I have in a dashboard for my display in the living room (WIP):

meteo

Since are all new cards, I can't really say if the browsers were responsive before the latest updates.

effelle commented 4 months ago

For the sake of knowledge, I noticed the very same issue on my phone. Here's a dashboard with a single, custom weather card based on mushroom template cards:

After a couple of minutes the companion app will hangs for some seconds when trying to open the input select list on top. It doesn't happens with a built in weather card:

milandzuris commented 4 months ago

@thomasloven @KTibow

KTibow commented 4 months ago

What here involves me?

milandzuris commented 4 months ago

What here involves me?

Hi, are you contributor for card mod?

KTibow commented 4 months ago

I may have made some contributions but I'm not involved in it and haven't used it since it was switched to card-only mode.

milandzuris commented 4 months ago

@effelle @ToViNi something new?

effelle commented 4 months ago

Nope, I was in a hurry then I switched all my mushroom card to simple markdown cards with the help of layout cards, another big one mod from Thomas:

2024-02-28-110508_1366x768_scrot

I don't need interactive cards, just displaying them is enough. For me all the issues are gone: CPU usage lowered and no more ram hogging on clients until Chromium die.

Bottom line: I never used the markdown card before and I must admit it lacks a bit of flexibility but, hey, it works just fine and is lighter than mushroom cards with card-mod on top. In some way I need to thank Thomas (I'm serious) because he gave me the opportunity to learn something new!

ildar170975 commented 4 months ago

As usual: mixing together lots of custom cards like mushroom - and blaming card-mod. Good that at least one person has sorted it out.

effelle commented 4 months ago

@ildar170975 I tend to agree with you when we speak about a "use but not abuse" situation but I'm really thinking something happened passing from HA 2024.1 tp 2024.3. Look at my other post where I said the companion app hangs with just two modded cards in a vertical stack. Now, I'm pretty sure mushroom cards are to blame too , in the end customization come at the cost of performance, but I never saw memory running out on my devices because a dashboard goes berserk, even with mushroom cards.
It doesn't means the guilty is card-mod, I can't say it. I've just wrote down my experience on an existing issue because I saw some serious performance degradation on a low end device, more sensible to CPU/Memory loads. If and when someone will add some more feedback we will find the culprit, but for now I'll continue my journey learning how to optimize my dashboard without relying on custom components.

ildar170975 commented 4 months ago
  1. My observations are: every new HA version causes a bit more load. Old iPhone 5S became too slow even with standard cards. iPad Air 2 (which may be also considered as "old") still works even with custom cards - but slower & slower. I bet you can recall lots of simple applications whose new shine versions work slower than old versions (with a less amount of added useful functionality). This are consequences of "lots of humans started programming".
  2. A usual way: when you see any issues test with standard cards first.
milandzuris commented 4 months ago

https://github.com/piitaya/lovelace-mushroom/issues/1382

xiayesuifeng commented 4 months ago

The same problem, HA 2024.2.5, frontend CPU usage is very high, but after downgrading card_mod to v3.4.0, the problem seems to be solved. Maybe it is the same problem as #346 ?

swampylee commented 4 months ago

I had the same issue and down graded card mod to 3.4.0 and things are much better. It does seem related to something in card mod that's changed between 3.4.0 and 3.4.2

automaticquality commented 3 months ago

I came here ready to grab a pitchfork and blame card mod for breaking my UI. Every time the HA wall panel turned on some cards would be frozen, after 10-20 secs card mod elements would finally load in & cards would unfreeze. But I downgraded to 3.4.0 & then totally removed card mod and the issue persisted, timers were still freezing, card mod was just the most visually obvious thing not loading correctly.

I reverted to a backup from mid Feb & just not updating anything now, everything is running smoothly again.

Aasikki commented 3 months ago

My dashboard was loading slow and not displaying properly at times forcing me to close and re-open home assistant (or refresh on a browser). Downgrading to 3.4.0 seems to have fixed this for me.

thomasloven commented 3 months ago

I cannot reproduce this problem, but maybe version 3.4.3 will help.

automaticquality commented 3 months ago

Thanks for your hard work, Thomas.

Aasikki commented 3 months ago

I cannot reproduce this problem, but maybe version 3.4.3 will help.

Updated right after seeing this and seems to be working so far. Thanks! I'll report back if that changes.

Cheerpipe commented 3 months ago

v.3.4.3 restored pre v3.4.1 performance levels.

Thanks for keep this amazing and unique project alive.

swampylee commented 3 months ago

Sorry to say that it doesn't appear to have fixed the issue for me. I updated from v3.4.0 to v3.4.3 - cleared cache, reloaded and even restarted HA (and checked the version in the dev console was correct) but if I leave one of my dashboards on a tab and go off to do something else when I try to switch back to it it's either hung or is displaying "out of memory". Looks like for me I'll have to revert back to v3.4.0.

automaticquality commented 3 months ago

Again I strongly suspect something other than card mod is potentially causing this issue, at least for me.

Some elements of dashboards were still taking 10-20 secs to load even after I totally removed card mod.

The solution for me was to revert to a month old backup, which also stepped back a version or two of HA core and supervisor. (Edit: I think there may have also been a Mushroom Card update in there)

I would be happy to troubleshoot by updating HA components one at a time to try and identify the problem, but unfortunately I have limited free time for the next couple months.

DevoliaEsp commented 3 months ago

I updated from v3.4.0 to v3.4.3 as well. It doesn't seem to fix the slow loading. I've recorded a short comparison, first you see the behaviour of 3.4.0, and then 3.4.3. As you can see, in the earlier version, the loading of elements is more smooth. In 3.4.1, 3.4.2 and 3.4.3, everything seems to freeze for a moment before loading : https://www.youtube.com/watch?v=ivXEGBygLvI This apply to multiple elements in my dashboard, making every elements loading "blinking" into existence. For now I'll stuck with 3.4.0, but I'll happily try the future version hoping it'll solve this issue.

walk0080 commented 3 months ago

Went back to 3.4.0 a while. Seems card-mod 3.4.3 has resolved the performance and hung formatting issues experienced in lovelace... at least so far with my setup.

Even on the most problematic devices (due to slow/old processors), e.g. iPad Air 2 and iPad Mini 5 are working OK.

D3v01dZA commented 3 months ago

Just got 3.4.3 and it has boosted performance significantly. I generally use Safari and it would take 2 or so seconds to load up, its instant now.

effelle commented 3 months ago

Again I strongly suspect something other than card mod is potentially causing this issue, at least for me.

This! Even removing card_mod AND mushroom cards, on my living room display the browser die every now and then. It's better than before but I agree: the issue is buried somewhere deeper in HA. For now ,to solve the out of memory error, I've simply added a cron job pressing F5 every 6 hours. Have a look, that's my average ram consumption with a fresh page (please note the cpu usage too):

ram_low

And that's after 4-5 hours:

ram_high

No human interaction and no change on display page.

Now, my display is based on a Celeron E3050 with just 2 GB Ram. It's nothing fancy but should be enough to show just a chromium page and nothing more.

effelle commented 3 months ago

I would like to add another piece to the puzzle, further reducing the possibility that cardmod is the culprit of the issues with RAM usage. One of the views I have on my living room display is also the one causing more problems with ram. It had an iframe card picking data from windy (satellite info for weather). I replaced it with a fake camera image grabbed from windy.com trough puppeteer feeding a picture-elemens card every 5 minutes and done. My RAM/CPU usage dropped a bit and doesn't increase over time even with 3 mushroom cards with card_mod on top:

Untitled

No more out of memory for me since two days. I make @ildar170975 's words my own: experimenting with standard cards before moving on to custom ones helped a lot in finding the problem. What I'm trying to say is that there isn't just one guilty, each one of us can have a strange combination of things that create the issue.

My two cents.

PulsarFX commented 3 months ago

For me it hit me like a wall. My low power kitchen pc locks up after sometime, even with card_mod 3.4.3. It does not on a lovelace page where no card_mod is used. For testing:

  1. add a powerflow card and another card with card_mod applied.
  2. On a second lovelace page, do the same without using card_mod.

Expected:

On the second screen I have this with 2 heavy apex charts and the mini pc doesn't get stuck. But does so on the front page where card_mod is present.

I wish I could make it more specific when this became an issue, as the frontpage ran nicely for hours. Either with an HA update or card_mod update :-/

ToViNi commented 3 months ago

Same here. No issues without card-mod, BUT the changes is not in card-mod, but in HA. Something drastic changed between 2024.1.6 and 2024.2.0 Browsers are eating up memory. Crome managed to use 16GB alone after some time. Tried debugger in browser and found that almost all time used was "scripting". Tried too zoom in, and found that the time spend was in a and y functions in card-mod. OK, my lovelace pages are very complicated and updates frequently, but are also not usable with the new HA versions :( Pages use minutes to fully load, and stops responding.

ToViNi commented 3 months ago

HA version 2024.3.3 seems to work much better than 2024.2.0 - 2024.3.2 Not perfect, but better. Is someone able to spot the changes in the lovelace code?

PulsarFX commented 3 months ago

Indeed! 24.3.3 made it much better in rendering performance, but the browser tab still keeps crashing.

samuele2723 commented 3 months ago

i follow the topic:

noticed performance degradation 2024.3.X and 2024.3.X... i stay for now 2024.1.6

on the other side, i need to understand how to light up my dashboard... e.g. markdown instead of mushroom?

-- seems mushroom template is lighter than markdown... not sure why but i tested widely with side by side on my cards loading.. mushroom loads faster

samuele2723 commented 3 months ago

Same here. No issues without card-mod, BUT the changes is not in card-mod, but in HA. Something drastic changed between 2024.1.6 and 2024.2.0 Browsers are eating up memory. Crome managed to use 16GB alone after some time. Tried debugger in browser and found that almost all time used was "scripting". Tried too zoom in, and found that the time spend was in a and y functions in card-mod. OK, my lovelace pages are very complicated and updates frequently, but are also not usable with the new HA versions :( Pages use minutes to fully load, and stops responding.

i also have some RAM problem on my surface 4 with 4GB of RAM. How to mitigate that?

ToViNi commented 3 months ago

This change was in HA 2024.2.0 , so I have been looking for the concrete changes in the frontend code. In this changelog, there seems to be 2 changes that may affect card-mod as far as I can guess. Reloading of icons, and changes to the page cache. Sometimes when the page stop responding, all the icons are blank. https://github.com/home-assistant/frontend/releases/tag/20240202.0

ToViNi commented 3 months ago

Related HA bug report? https://github.com/home-assistant/frontend/issues/20184

Montreal666 commented 2 months ago

Same type of issues where 3.4.0 performs better than 3.4.3. Did 3.4.3 fix it for some/all of you? Following.

samuele2723 commented 1 week ago

Dears, i think i've found something interesting. About the general slow and stuck issue i noticed that the possible reason was not the RAM but the CPU throttling at low speed (i am using a Surface Pro in different versions 4,5,7 as dashboards).

It should be a pretty good machine, but it sucks when your CPU goes 0.7 GHZ instead of 2\3 GHZ.

NOW...

i installed Throttlestop and noticed that problem making CPU throttling was power consumption above limit (15W) Then, i did some tests, and JUST disabling animations injected mainly in Mushroom cards through Card Mod, seems my power goes from 17W to stable 3W showing the same dashboard.

Also notice that is clear that power goes up with animations, in the dashboard with 3v, i just placed animation in one card in the tesla card group and can turn on\off and you can see with just 1 animation the power goes to 9W on\off

Not expert enough understanding why this is happening, but in my specific case a lot seems around animations through card_mod

plese see video

https://github.com/thomasloven/lovelace-card-mod/assets/66970905/f7e6a498-7870-4497-a6d9-6333cd0cd3cf

droans commented 1 week ago

That tracks with what I've seen. I believe the issue goes back to the templating.

I've noticed that it's worst when I'm editing the dashboard and that errors from frontend templates are showing up more often in my logs.

I also noticed a sharp reduction in how often this occurs after removing templated data or limiting the need for templates.

My belief is that due to a change, they're no longer being rate-limited and are just being constantly tested.

thomasloven commented 1 week ago

Something I learned from the imfamous April fools joke (which will never happen again) is that transform: will kill your computer. Hardware acceleration for browsers is coming along, but it's not quite there yet.

droans commented 1 week ago

I don't use transform in any of my templates. My templates are designed to affect padding, background, border, margin, overflow, color variables, height, position, etc.

Here's a complete list in (what should be) alphabetical order of all the CSS items my card_mod styles target:

div:
  hui-vertical-stack-card:
    $:
      div#root:
        fold-entity-row:
          $: |
            div#items {
                padding-left:

ha-card {
  background: 
  background-image:
  border-radius: 
  border-width: 
  margin: 
  overflow: 
  --card-mod-icon-color: 
  --card-primary-color: 
  --ha-card-background: 
  --ha-card-box-shadow: 
  --ha-card-text-color: 
  --mdc-theme-primary: 
  --mush-chip-background: 
  --mush-rgb-state-alarm-armed: 
  --mush-rgb-state-alarm-triggered: 
  --primary-text-color: 
  --secondary-text-color: 
  --switch-checked-button-color: 
  --switch-checked-track-color: 
  --state-climate-heat_cool-color: 
  --state-alarm_control_panel-armed_away-color: 
  --state-alarm_control_panel-armed_custom_bypass-color: 
  --state-alarm_control_panel-armed_home-color: 
  --state-alarm_control_panel-armed_night-color: 
  --state-alarm_control_panel-armed_vacation-color: 
  --state-alarm_control_panel-arming-color: 
  --state-alarm_control_panel-disarmed-color:
  --state-alarm_control_panel-disarming-color:
  --state-alarm_control_panel-pending-color:
  --state-alarm_control_panel-triggered-color:
  --state-icon-color:

ha-card mushroom-shape-icon {
  --icon-color:
  --shape-color:

ha-card div {
    border-width:
    margin:
    padding:

ha-card .time-picker-header {
  border-radius:

ha-card .time-picker-row.with-header-name {
  border-bottom-color:
  border-bottom-style:
  border-bottom-width:
  border-left-color:
  border-left-style:
  border-left-width:
  border-radius:
  border-right-color:
  border-right-style:
  border-right-width:

ha-markdown {
  border:
  background-color:
  height:
  padding:
  padding-bottom:
  padding-left:
  padding-right:
  padding-top:

ha-markdown.no-header {
  padding:
  padding-top:

hr {
  background-color:
  border:
  height:

hui-generic-entity-row:
  $: |
    state-badge {
      display:
    }
    .info {
      flex:
      margin-left:
    }

mushroom-light-brightness-control {
  height:
  position:
  right:
  width:

mushroom-light-brightness-control:after {
  align-items:
  color:
  content:
  display:
  font-size:
  height:
  justify-content:
  pointer-events:
  position:
  right:
  top:
  width:

mushroom-select-option-control {
  --mdc-ripple-color:
  --mdc-theme-primary:
  --mdc-theme-text-primary-on-background:

mwc-list-item {
  --mdc-theme-primary:

:host {
  margin: 1px 1px 0px 0px;
  --chip-background:
  --color:
  --ha-card-background:
  --mdc-select-dropdown-icon-color:
  --mdc-select-fill-color:
  --mdc-select-ink-color:
  --mush-card-secondary-font-size:
  --mush-card-secondary-font-weight:
  --mdc-theme-primary:
  --mush-rgb-state-alarm-armed:
  --mush-rgb-state-alarm-triggered:
  --primary-text-color:
  --secondary-text-color:
  --stack-card-gap:
  --state-alarm_control_panel-armed_away-color:
  --state-alarm_control_panel-armed_custom_bypass-color:
  --state-alarm_control_panel-armed_home-color:
  --state-alarm_control_panel-armed_night-color:
  --state-alarm_control_panel-armed_vacation-color:
  --state-alarm_control_panel-arming-color:
  --state-alarm_control_panel-disarming-color:
  --state-alarm_control_panel-pending-color:
  --state-alarm_control_panel-triggered-color:
  --state-alarm_control_panel-disarmed-color:
  --time-picker-accent-color:
  --time-picker-elements-background-color:
  --time-picker-off-color:

:host ha-card {
  background:
  background-color:
  border:

#states {
    padding:
    padding-left:

An issue with how templates are handled would also explain why people thought Mushroom might be the issue. If something changed which caused HA to update templates more often, I'd expect an issue like this.

droans commented 1 week ago

I'm hoping this can be helpful. I ran a Performance test in Chrome and forced high memory usage by editing different cards until the memory reached 700mb+.

It looks like the total number of nodes went from about 14K to 321K while the listeners increased from 2.5K to 36K.

The call tree shows that the pointerover event had the highest total-time while "Recalculate Style", "Layerize", "Layout", "Pre-Paint", "Paint", and "Commit" had the highest self-time.

Looking at the bottom-up call, the mouseover and pointerover events along with "(anonymous)" card-mod.js functions (card-mod.js:1:41963), appears to have the highest total time.

Scripting calls made up 2/3 of the total self time, but they were rather evenly spaced out. "Recalculate Style" used about 27% of the total self time and 36% of total time. The source here is showing as decluttering-card.js but that could just be because that's what's pulled in.

The Event Log shows a large number of time-consuming style recalculations with the broswer suggesting that forced reflow is the issue.

The Selector Stats shows that the div selector was the highest matched by far with 47,6K of total matches. slot was second with 17K.

I can send a full copy of the trace if needed. It is about 300MB, though.

PulsarFX commented 1 week ago

Do these issues go away, when you disable card-mod? I'm completely lost. I divided my main crashing dashboard into smaller ones to test them separately, but I can't find a pattern. One time tab A crashes, next time it's tab B with the other half of the main dashboard.

rubin110 commented 1 week ago

With all of my testing I have settled on the root cause being that the front end does a lot during initially loading into the browser (desktop or mobile app) and a bunch of race conditions happen with which front end resources gets loaded and in what order. I was able to meditate many (but not) all of card-mod not loading quick enough (still really slow) issues by moving a Frigate/webRTC card away from my default page over into another one.

Give running HA with only card mod as an added resource for the front end and check out your profiling.

droans commented 6 days ago

I just waited for the memory usage of my HA tabs to grow above 1GB during normal use (IE not in edit mode, not making erratic changes to force it) and ran a quick performance check. Again, the number of nodes was extremely high - this time 325,000.

I've also noticed the same memory issues when I have a tab that has only been active on Developer Tools or the Settings tab. This would make sense - card-mod is supposed to be added to your HA config as an extra_module_url which means it is always loaded.

However, at least for me, this bug caused both memory and CPU usage to increase greatly. Memory increases over time but CPU usage remains consistently high the whole time.

I tried testing this a bit. I removed card-mod from my HA config and just made it a resource. I then restarted HA and killed and recreated the tab in Chrome and waited until the memory usage grew. Eventually it hit over 1GB while the CPU was fluctuating between ~20%-150%. I tried performing a garbage collection but it did not make a difference in the memory or CPU usage. In fact, the memory usage was still slowly climbing. Then, I switched too the Settings tab and ran it again, but I received the same result.

Finally, I reloaded the tab. This time, CPU usage dropped down to 1-20%. Memory usage was still high but it had plateaued. I ran a GC and this time, it reduced memory down to ~825MB. While that's still very high, it has remained consistent for about 20-30 minutes.

My best guess is that this isn't strictly a card-mod issue.

I did a very quick search in the frontend code base to see if there were any changes that might be related. Sure enough, Between 2024.1 and 2024.2, there were quire a few commits with diffs containing ha-card due to the icon change. While some were just minor fixes that didn't change anything, many files began including ha-card as a JS import and/or an HTML element.

Since card-mod binds itself to every element (for example, the automation condition below) , while it also binds itself to every single ha-icon element inside an ha-card, I would guess that the frontend is creating and destroying something in the background. Since card-mod bound itself, it isn't being picked up by the GC.

Perhaps there needs to be a check added to see if the card is present on a dashboard, has a configuration, and/or has card_mod in the configuration before attaching itself to the card.

image

samuele2723 commented 4 days ago

Something I learned from the imfamous April fools joke (which will never happen again) is that transform: will kill your computer.

Hardware acceleration for browsers is coming along, but it's not quite there yet.

Is there any other way to implement animations like rotate without "transform:"?

PulsarFX commented 2 days ago

I seem to have tracked down a possible cause in custom:weather-chart-card on my dashboard. I also use custom:power-flow-card-plus right next to it. When I split them into separate views, the weather chart crashes the tab. Whereas powerflow paints its dots happily without stuttering ( a good indicator on how stuck the tab has gotten already)

Today I switched to the stock weather card and kept all other things same (with card-mod changes) and the tab did survive multiple hours without an issue. It even reacts like used to after several hours. On a stuck tab a big delay is happening when clicking another link.