Skip to content

Conversation

@nename0
Copy link
Contributor

@nename0 nename0 commented Aug 22, 2018

In StickyStyle getBoundingClientRect() is called to calculate the offset of the next sticky row. This causes a forced reflow(link). However this is not needed when there is only one sticky row.

@nename0 nename0 requested a review from andrewseguin as a code owner August 22, 2018 09:28
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 22, 2018
@devversion devversion added perf This issue is related to performance target: patch This PR is targeted for the next patch release merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed labels Aug 22, 2018
The offset of a sticky row is calculated by summing up the heights of
the previous sticky rows. As the access to the height causes a forced
reflow this is now skipped when there is only one row.
@nename0
Copy link
Contributor Author

nename0 commented Sep 14, 2018

@devversion friendly ping

@devversion devversion added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed labels Sep 14, 2018
@devversion
Copy link
Member

Sorry @nename0 for the delay.

This PR looks good to me, but I wanted to get a second review from @andrewseguin.

@josephperrott josephperrott changed the title pref(table): prevent unnecessary reflow with sticky row perf(table): prevent unnecessary reflow with sticky row Oct 2, 2018
@vivian-hu-zz vivian-hu-zz merged commit 63f2ef4 into angular:master Oct 2, 2018
@nename0
Copy link
Contributor Author

nename0 commented Oct 2, 2018

Thanks!

@nename0 nename0 deleted the patch-1 branch October 2, 2018 20:45
roboshoes pushed a commit to roboshoes/material2 that referenced this pull request Oct 23, 2018
The offset of a sticky row is calculated by summing up the heights of
the previous sticky rows. As the access to the height causes a forced
reflow this is now skipped when there is only one row.
@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 Sep 9, 2019
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 cla: yes PR author has agreed to Google's Contributor License Agreement perf This issue is related to performance target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants