-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tree) make change detection less often #11103
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
fix(tree) make change detection less often #11103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/cdk/tree/tree.spec.ts
Outdated
@@ -605,7 +605,9 @@ describe('CdkTree', () => { | |||
try { | |||
TestBed.createComponent(NestedCdkErrorTreeApp).detectChanges(); | |||
flush(); | |||
} catch { | |||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need e
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafaelss95, e
is removed
The CdkTree component calls change detection after each node insert, which has impact on performance. The fix is to call change detection only once, when a set of nodes is rendered. Related bug: angular#11101
f4b4cd9
to
0fbbe45
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The CdkTree component calls change detection after each node insert, which has impact
on performance. The fix is to call change detection only once, when a set of nodes
is rendered.
Related bug: #11101