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
Include trickery to reduce paints and improve performance #1120
Conversation
@xPaw, is this ready for review? |
@astorije should be. |
aa35ba0
to
7ec0dcf
Compare
(Simply rebased on |
@@ -374,8 +370,7 @@ kbd { | |||
} | |||
|
|||
#viewport.rt #chat .sidebar { | |||
-webkit-transform: translate3d(180px, 0, 0); | |||
transform: translate3d(180px, 0, 0); | |||
right: -180px; |
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.
From the links you posted in PR description, I understand that right
would need a repaint as opposed to transform
. Is that what will-change: transform;
below is trying to prevent?
Also, how does will-change: transform;
work if you removed the transform
property above?
Sorry, still trying to understand how all of this works...
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.
You are correct that it would be doing a repaint, however this was needed to fix the font rendering issue.
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.
Looks good, will make it a bit easier on my poor ageing phone :-P
@YaManicKill, what do you think, merge this before or after #1175? :/ |
Before is fine, afaics it doesn't edit any of the code I have edited. |
Include trickery to reduce paints and improve performance
Fixes #1083.
Fixes #1071.
I tested this with #1041 and it showed lower CPU usage.
https://developers.google.com/web/fundamentals/performance/rendering/simplify-paint-complexity-and-reduce-paint-areas
https://developers.google.com/web/updates/2016/06/passive-event-listeners