Skip to content
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

Ripple animation causes whole page to repaint #142

Closed
Elliot128 opened this issue Nov 19, 2015 · 1 comment
Closed

Ripple animation causes whole page to repaint #142

Elliot128 opened this issue Nov 19, 2015 · 1 comment

Comments

@Elliot128
Copy link

Found this issue while testing on my Lg G2 with Chrome.

Ran a list with 1 button vs a list with 100 buttons.

Clicking a button on the 1 button list renders the ripple fluidly.

Clicking a button on the 100 button list renders the ripple with a low framerate.

@EnzoMartin discovered that this was because the whole page was being repainted with every frame of the ripple animation.

@javivelasco
Copy link
Member

The problem is that in the initial implementation we animated width and height though a transition. This makes the browser to repaint. Furthermore, the ripple was positioned with absolute and, although this is not animated, it's also provoking a repaint.

The solution I've implemented gets rid of absolute positioning and animating width/height variations. Instead now it's animation a transform: scale() from 0 to 1. The position is changed using transform: translate3d. This allows to have a huge performance boost.

It will be released during the afternoon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants