Skip to content

Should Tree use OnPush? #25440

Open
Open
@jelbourn

Description

@jelbourn

Right now, CdkTree explicitly marks itself as ChangeDetectionStrategy.Default:

// The "OnPush" status for the `CdkTree` component is effectively a noop, so we are removing it.
// The view for `CdkTree` consists entirely of templates declared in other views. As they are
// declared elsewhere, they are checked when their declaration points are checked.
// tslint:disable-next-line:validate-decorators
changeDetection: ChangeDetectionStrategy.Default,

I suspect the rationale here is no longer may no longer be accurate. My understanding is that, under Ivy, change detection happens at both the declaration point (the end-developer's component) and the insertion point (the cdkTreeNodeOutlet inside the CdkTree template).

We should determine whether we should change the tree back to OnPush.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/treeperfThis issue is related to performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions