Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

core-list is inefficient in data initialization #9

Closed
tjsavage opened this issue Aug 1, 2014 · 2 comments
Closed

core-list is inefficient in data initialization #9

tjsavage opened this issue Aug 1, 2014 · 2 comments

Comments

@tjsavage
Copy link

tjsavage commented Aug 1, 2014

Two related problems: the bigger one is core-list will re-initialize all of its elements if you add data to the list, even if that new data is far offscreen and isn't physically present.

e.g. if you have a core-list with data bound to a 100 element array, and then call .push({}) on that array, the core-list viewport will be re-initialized which is very expensive (~300ms in the example I'm looking at on a Nexus 5). For true infinite scroll we want to be able to load data from the network (or elsewhere) and add it to the list before its needed.

The other problem is that this re-initialization is itself so expensive, largely because every one of the template instances is individually laid-out -- so there is a requestAnimationFrame called for each, a layout call, and some other overhead that's done for every single element; a form of layout thrashing. It would be much more efficient to batch this somehow...

@kevinpschaaf
Copy link
Contributor

Most of this will be resolved in core-list improvements on work-in-progress branch https://github.com/Polymer/core-list/tree/2way-improved.

kevinpschaaf added a commit that referenced this issue Sep 26, 2014
2-way binding, bindable selection, and efficiency improvements - fixes #2 #7 #9 #13 #15
@kevinpschaaf
Copy link
Contributor

Fixed in #30.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants