-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dom-repeat initial-count throttling fails when pushing new items #5631
Closed
kevinpschaaf opened this issue
Feb 18, 2020
· 0 comments
· May be fixed by 137717unity/wpt.fyi#4, eroself/vaadin-litelement-datebook#2, eroself/vaadin-litelement-datebook#3, eroself/vaadin-litelement-datebook#4 or eroself/vaadin-litelement-datebook#5
Closed
dom-repeat initial-count throttling fails when pushing new items #5631
kevinpschaaf opened this issue
Feb 18, 2020
· 0 comments
· May be fixed by 137717unity/wpt.fyi#4, eroself/vaadin-litelement-datebook#2, eroself/vaadin-litelement-datebook#3, eroself/vaadin-litelement-datebook#4 or eroself/vaadin-litelement-datebook#5
Labels
Comments
kevinpschaaf
added a commit
that referenced
this issue
Feb 21, 2020
* Only restart chunking (resetting the list to the initialCount) if the `items` array itself changed (and not splices to the array), to match Polymer 1 behavior. * Add `reuseChunkedInstances` option to allow reusing instances even when `items` changes; this is likely the more common optimal case when using immutable data, but making it optional for backward compatibility. * Only measure render time and throttle the chunk size if we rendered a full chunk of new items. Ensures that fast re-renders of existing items don't cause the chunk size to scale up dramatically, subsequently causing too many new items to be created in one chunk. * Increase the limit by the chunk size as part of any render if there are new items to render, rather than only as a result of rendering. * Continue chunking by comparing the filtered item count to the limit (not the unfiltered item count).
kevinpschaaf
added a commit
that referenced
this issue
Feb 22, 2020
Fixes for several related dom-repeat chunking issues. Fixes #5631.
This was referenced Sep 7, 2024
This was referenced Sep 14, 2024
This was referenced Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When adding new items to an already-rendered
<dom-repeat>
withinitial-count
, chunking is re-initialized. This has two effects: First, any already rendered items past the initial count are removed, then because the already-rendered items "render" in a very short time, the average time per item is very low, causing the remainder of the list to be rendered in one shot, thus chunking is defeated for newly added items.Live Demo
https://glitch.com/edit/#!/kaput-hollyhock-o6tozsgx4a?path=index.html:9:0
Expected Results
Actual Results
Versions
The text was updated successfully, but these errors were encountered: