components icon indicating copy to clipboard operation
components copied to clipboard

perf(material-experimental/mdc-chips): Fix runaway change detections

Open mleibman opened this issue 3 years ago • 0 comments
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:

52fnPoLhetQ2dyk

After:

5WJ87evzPtjeSsx

mleibman avatar Jul 22 '22 03:07 mleibman