-
Notifications
You must be signed in to change notification settings - Fork 6.8k
perf(table): Use only one column classname and do string interpolatio… #19743
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
Conversation
…n once per column
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
Leaving |
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, although I find it a little surprising that concatenating a few strings would take several milliseconds.
The biggest change here comes from only adding one css class instead of 2, but spread across thousands of cells the concatenation has a small impact as well. |
Sorry this took so long to get in. We likely ran into failures internally from this. If you'd still like to land it, feel free to reopen a new rebased PR and we can take another shot at it |
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. |
…n once per column
In the "Table with sticky headers, footers and columns" example which has 10 rows, this roughly halves time spent on computing and adding these classes (3.5ms -> 1.8ms), but for tables with more rows/columns the effect is worthwhile.
This is potentially a slightly breaking change as there could be apps using MatTable that are depending on the Cdk classes for something.