swipe-card icon indicating copy to clipboard operation
swipe-card copied to clipboard

Slow Load Time

Open zgadson opened this issue 3 years ago • 3 comments

Been noticing slow load times of the Swipe card, and in testing the Swipe card in a dashboard all its own, it still takes 15-20 seconds before it even appears. I use Swipe a lot throughout my Home Assistant build, and unfortunately this has rendered parts of my dashboard almost unusable.

Here's my sample file:

`views:

  • title: Home path: home icon: mdi:home panel: false cards:
    • type: picture-elements image: /local/wallpaper/mobile_wallpaper_geometric.png elements:

      • type: state-label entity: sensor.date_string tap_action: none style: top: 1.5% left: 49% width: 100% text-transform: uppercase text-align: Left font-weight: 500 font-size: 15px letter-spacing: .015em

      • type: image entity: person.zach state_image: home: /local/users/Zach_home.jpg not_home: /local/users/Zach_not_home.jpg style: background-color: rgba(255, 255, 255, 0.0) left: 83.5% top: 2.8% height: 4.5% width: 4.5%

      • type: custom:swipe-card style: left: 60% top: 50% width: 75% cards:

        • type: picture-elements image: /local/Single_Row_Full_Width.jpg style: left: 50% top: 25.2% width: 98% elements:
          • type: custom:text-element text: Test style: top: 20% left: 51% width: 100%`

zgadson avatar Oct 19 '21 13:10 zgadson

Same here, mine was even worse. It will take around a minutes to load the screen unless I change the entities' state/value. Nos sure what's going on.

qee184368216 avatar Apr 04 '22 05:04 qee184368216

Same here, have the same issues with slow load time.

Don't know if it's the same for everyone else, but sometimes (rarely) it loads instantly when refreshing and sometimes it just fails with the following error.

Uncaught (in promise) TypeError: this.createCardElement is not a function
    at ee._rebuildCard (swipe-card.js:19:1842)
    at t.addEventListener.once (swipe-card.js:19:1774)
    at i (app.5e0fa6df.js:851:137146)
    at 0649eef7.js:1484:4945

mikaelhertzman avatar Mar 06 '23 17:03 mikaelhertzman

Had the same issue.

Wrapping it into another card helped me fixing this issue. I used "stack-in-card" for building stacks and it ended up loading the swipe card instantly. Hope this helps.

andy-arbeit avatar Mar 17 '24 23:03 andy-arbeit