Skip to content

bug(mat-form-field): Forced reflow warning for each mat-form-field in dev tools. #26855

@Siddhu-K

Description

@Siddhu-K

Description

I have a form with multiple rows of mat-form-fields, when I get the data from the server to edit, it takes around 5 seconds to load the mat form fields (100+ form fields).

I checked the peformance tab in the devtools and found that the forced reflow warning for each of the mat-form-field.

the problem doesn't exist when adding multiple

Reproduction

Steps to reproduce:

  1. add multiple mat-form-fields
  2. check peformance tab, there is Recalculate style for each of the mat-form-fields.

Expected Behavior

avoid recalculate style in mat-form-fields.

Actual Behavior

Screenshot 2023-03-29 164325

recalculate style for each of the mat-form-field
Screenshot 2023-03-29 164700

Environment

Angular CLI: 15.2.4
Node: 16.14.0
Package Manager: npm 8.18.0
OS: win32 x64

Angular: 15.2.4
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router, service-worker

Package Version

@angular-devkit/architect 0.1502.4
@angular-devkit/build-angular 15.2.4
@angular-devkit/core 15.2.4
@angular-devkit/schematics 15.2.4
@schematics/angular 15.2.4
rxjs 7.8.0
typescript 4.8.4

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs to be triaged by the team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions