geckoservo::glue::traverse_subtree was slower in Fenix compare to Fennec
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: sefeng211, Assigned: emilio)
References
Details
Attachments
(3 files)
Fennec: https://perfht.ml/2TpGIpH
Fenix: https://perfht.ml/2Pv9h3w
Phone: Moto G5.
The profile was taken by loading https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-commits-in-git
.
Based on the profile, Fennec was 20ms and Fenix took 100ms. And there's another call path in Fenix profile, which also took 30ms.
Assignee | ||
Comment 1•5 years ago
|
||
I'm a bit confused by that callstack as it's only showing the StyleSubtree calls that appear under the frame constructor, which are usually just for native anonymous content and such.
These are probably scrollbar styles.
We added a caching mechanism for them in bug 1554571, but that also included a bunch of exit conditions and extra rules. So the individual StyleSubtree calls are expected to be more expensive, but we should not have many of them.
That being said, give Geckoview has their own CSS for scrollbars, it may be that they're not hitting the optimized path.
At a glance, this:
Seems like it'd conflict with this:
So we would be doing much more expensive styling of all the scrollbar thumbs and such. Does commenting out the scrollbar-related rules in geckoview.css help with this? Can you check whether you're hitting the allowStyleCaching=false
?
Assignee | ||
Comment 2•5 years ago
|
||
Alternative approach of verifying that hypotheses:
- Turn
layout.css.cached-scrollbar-styles.enabled
tofalse
- Remove this rule
- Are the times the closer to the fennec ones?
Reporter | ||
Comment 3•5 years ago
|
||
NI myself for verifying the hypotheses.
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Hi Emilio,
I tried the #comment 2 approach and it improved it a lot. Looking at the profiles, without change https://perfht.ml/2VMV1aB and with change https://perfht.ml/38wnBzI , it cuts more than half the time!
Assignee | ||
Comment 5•5 years ago
|
||
Ok, that's great to know... I'll take a look at this next week.
Assignee | ||
Comment 6•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
(Because of all the extra declarations)
Depends on D65915
Assignee | ||
Comment 8•5 years ago
|
||
It seems very paranoid about stuff that can't happen.
Depends on D65916
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a6b513d590d4
https://hg.mozilla.org/mozilla-central/rev/85020a807040
https://hg.mozilla.org/mozilla-central/rev/bbcf0278b31d
Description
•