elements: no coalescing of change detection invocations across instances #33060
Labels
area: elements
Issues related to Angular Elements
area: performance
P4
A relatively minor issue that is not relevant to core functions
state: confirmed
type: bug/fix
Milestone
馃悶 bug report
Affected Package
The issue is caused by package @angular/elements.
Is this a regression?
No.
Description
While Angular custom elements do coalesce change detection invocations per element instance (see scheduleDetectChanges()), there is no coalescing across other instances of the same element or other elements (even for those on the same injector or component tree.
This results in too many CDs on pages/routes with many custom elements and can negatively affect performance. (This is the case for example in https://angular.io/guide/router, which has ~200 custom elements.)
Anything else relevant?
Related issues: #23813, #33059
EDIT:
Similar issue with useful context (closed in favor of this one): #23813
PR (that would at least cover some usecases): #23885
The text was updated successfully, but these errors were encountered: