components
components copied to clipboard
perf(material-experimental/mdc-chips): Fix runaway change detections
trafficstars
Fixes #25325 by reducing the overhead of having multiple instances of the component by ignoring calls to setDescribedByIds() where the value does not change, and using macroTasks (promise) instead of macroTasks (setTimeout) to schedule work to be done in the next change detection cycle.
In the example demonstrated in #25325, this PR improves performance by over 60%.
Before:
After: