Skip to content

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

Closed
wants to merge 4 commits into from

Conversation

kseamon
Copy link
Collaborator

@kseamon kseamon commented Jun 24, 2020

…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.

@kseamon kseamon requested a review from andrewseguin as a code owner June 24, 2020 15:33
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 24, 2020
@jelbourn jelbourn added target: minor This PR is targeted for the next minor release G This is is related to a Google internal issue labels Jun 24, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added the lgtm label Jun 24, 2020
@jelbourn
Copy link
Member

Leaving merge-ready for @andrewseguin

Copy link
Member

@crisbeto crisbeto left a 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.

@kseamon
Copy link
Collaborator Author

kseamon commented Jun 24, 2020

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.

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Jun 25, 2020
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@andrewseguin andrewseguin added needs rebase and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Dec 28, 2021
@andrewseguin
Copy link
Contributor

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

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker G This is is related to a Google internal issue target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants