Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please throw a warning if iron-list isn't explicitly sized #498

Open
ernsheong opened this issue Nov 23, 2017 · 2 comments
Open

Please throw a warning if iron-list isn't explicitly sized #498

ernsheong opened this issue Nov 23, 2017 · 2 comments

Comments

@ernsheong
Copy link

ernsheong commented Nov 23, 2017

My iron-list was happily rendering every single item in the list all this time until I hit extremely slow UI (1 fps) on Firefox 57, with a large number of items (but only 180 items?) in the list (also perhaps due to polyfill). Spent hours on the bug wondering why my iron-list was rendering everything and not doing what it was supposed to do.

I would like to suggest throwing a warning or error if the iron-list has not been explicitly sized to detect such failures early, especially when inadvertent changes to CSS are made that can cause iron-list to regress.

@keanulee
Copy link
Contributor

Not sure how to reliably use JS to determine if an element is explicitly sized at runtime. Also, you should check if the scroller is explicitly sized, since it's not always the case that iron-list itself is explicitly sized (e.g. it can delegate scrolling to the document).

@ernsheong ernsheong changed the title Please throw a warning if iron-list isn't explicitly sized. Please throw a warning if iron-list isn't explicitly sized Nov 28, 2017
@ernsheong
Copy link
Author

Hmm I think maybe a check that iron-list is rendering everything given to it suffices (length of backing array === no. of virtual row children), when length of item list exceeds a threshold (say 30?) It's just a warning so we need not worry too much about false positives.

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

No branches or pull requests

2 participants