lovelace-card-mod icon indicating copy to clipboard operation
lovelace-card-mod copied to clipboard

Lazy Load Resources

Open efaden opened this issue 1 year ago • 5 comments

I have a bunch of different resources I am trying to use on different dashboards. Tablets vs phones, etc. Normally the interface lazy loads the resources, but card mod seems to change this behavior to force everything to load. The issue with this is that as the number of resources references increases the load time increases as well causing issues. It's there a way to keep lazy loading?

efaden avatar Sep 29 '23 18:09 efaden

What resources? What makes you think card-mod forces anything to load?

thomasloven avatar Dec 28 '23 00:12 thomasloven

https://community.home-assistant.io/t/custom-element-doesnt-exist-but-loads-a-few-seconds-later/266349/2

See that. I read it somewhere else also. Basically all my JavaScript files download and seem to try to load even if the dashboard doesn't use them. Not a big deal on most devices but it's killing my tablets.

Is this not true?

efaden avatar Dec 28 '23 00:12 efaden

No. It's not.

thomasloven avatar Dec 28 '23 00:12 thomasloven

All custom resources are always loaded immediately. For the core frontend functionality, things are loaded as they are needed. And there isn't even any way to force everything to download as far as I know.

thomasloven avatar Dec 28 '23 00:12 thomasloven

Alright. Good to know. Sorry for opening this then. Several places implied card mod was changing the behavior some how.

I wish there was actually a way to use different resources per dashboard.

efaden avatar Dec 28 '23 00:12 efaden