-
Notifications
You must be signed in to change notification settings - Fork 912
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
When list items are removed list.layout is called multiple times can causes a performance issue #1927
Labels
Type: Bug
Something isn't working
Comments
Locally I've solved it with debouncing the layout method. It breaks tons of tests (due to the layout method becoming async). |
YonatanKra
changed the title
When list items are removed update items is called and causes a performance issue
When list items are removed list.layout is called multiple times can causes a performance issue
Nov 1, 2020
I've created #1928 to show a possible solution for this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The list-item's disconnected callback triggers the list's layout which triggers the updateItems. This causes a major performance issue with big lists.
To Reproduce
Steps to reproduce the behavior:
clear everything
button5.1 layout shift is reported
5.2 The task takes a huge amount of time (and blocks the UI for that amount of time)
Expected behavior
I'd expect the list items to be removed without a performance overhead.
Screenshots
That's how it looks in the "lab test" from the sandbox example:
This is how it looks in a real life example from an angular application using the mwc-select with mwc-list-item:
Browser Version (please complete the following information):
**Additional context
There's a need for this amount of items in the select. For instance - to show all the available timezones (around 400 timezones on earth apparently).
The text was updated successfully, but these errors were encountered: