michael-mammut
michael-mammut

Reputation: 2783

How to prevent performance bottleeck with polymer 1?

Environment

Polymer 1

Problem: I use an Array with 35 objects. I create the list of elements (all the same) by a dom-repeat template. It needs about 10 seconds to render all elements.

The whole browser is frozen until the process has finished.

First try to fix it In my Custom element, I use a dom-if with the restamp property, because I expected that the HMTL render process will be faster but without success.

Can someone give me a hint, how I can improve the performance?

Upvotes: 1

Views: 67

Answers (1)

Hyyan Abo Fakher
Hyyan Abo Fakher

Reputation: 3527

Use iron-list , it is what you are looking for

Here is a simple example, it can be used exacly like dom-repeat

<iron-list items="[[items]]">
<template>
  <div>
       [[item.name]]   
  </div>
</template>

Upvotes: 1

Related Questions