Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCut property cascading if display:none is found #19506
Conversation
highfive
commented
Dec 7, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Dec 7, 2017
|
r? @emilio |
|
try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3fd097f526d918b4274bfd287f4442d4db9822e0 talos comparison: The largest regression tpaint win32 pgo is down from 28% to 24%. comparison between w/o patch and w/ patch: https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=cb3e916eed78&newProject=try&newRevision=0afe6071baa4&framework=1 There aren't many "certain" result in this comparison, but as can be seen, it takes less time on most of the tests after this patch. |
|
@emilio If you still think we probably shouldn't take this... As far as we can find better places to optimize it, I guess I'm fine. Maybe a several percent optimization isn't really worth this relatively complicated change. |
|
Yeah, I'd prefer to hold this off for a bit until there's no better optimization possible I think... Not sure what @heycam or @SimonSapin think. |
|
|
|
I'd actually like to revive this PR. I think the idea here is straightforward, the mechanism isn't really that complicated, and it does lead to decent performance improvement based on previous measurement. |
|
|
|
Another thing I don't love about this patch is that it relies on the optimization to avoid keeping around display: none pseudo styles to be correct, otherwise there are missing checks... |
|
I still think this is too error-prone and too complex, even if it happens to be correct in its current form. |
|
It seems like xidorn has shown pretty conclusively that this issue is responsible for a sizeable part of our stylo-chrome regression (this is work that gecko doesn't do but stylo does, and eliminating the work fixes about a fifth of the regression). Can you help propose another way to address this issue? |
|
We have identified a bigger problem that is bug 1409672. I expect fix to that bug would reduce the improvement we see here since we may not be restyling display:none elements this often after that. We can measure again when that's done. |
|
This patch doesn't apply cleanly anymore, and fixing that seems to be non-trivial, so I'm closing this. If we still want to take it, we can do this in a new pr I guess. |
upsuper commentedDec 7, 2017
•
edited by SimonSapin
The
display: noneoptimization mentioned in bug 1422615.This change is