Applying outline-style: auto to a large number of elements makes WR scrolling unusable
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(2 files)
STR:
- Enable
layout.css.outline-style-auto.enabled
(or wait for bug 1031664 to be landed, which I plan to do not long from now). - Apply this rule to any page with the inspector:
* { outline: 1px auto }
. - Try to scroll.
ER:
- Scrolling is somewhat usable.
AR:
- WebRender becomes terribly slow, to the point you can't scroll.
Assignee | ||
Comment 1•5 years ago
|
||
Here's a profile of scrolling on this page which shows the 500ms+ CONTENT_FRAME_TIMEs: https://perfht.ml/39TkeEE
It seems we spend a bunch of time waiting on the GPU process, but not doing much?
Assignee | ||
Comment 2•5 years ago
|
||
It's unclear to me what is the GPU process waiting for... Nical, am I missing any thread in the profiler or something?
Comment 5•5 years ago
|
||
Yeah. It looks like we're spending all of our time in memmove. We seem to be recording theme bitmaps into blobs and then the recording is just memoving out of them or something like that. We're supposed to avoid recording widget drawing as blobs. Perhaps that's not happening here.
Comment 6•5 years ago
|
||
https://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderCommandBuilder.cpp#2093
Are the outlines nsDisplayThemedBackground or nsDisplayButtonBorder?
Assignee | ||
Comment 7•5 years ago
|
||
They are nsDisplayOutline
. This is the code path that triggers the blob: https://searchfox.org/mozilla-central/rev/be7d1f2d52dd9474ca2df145190a817614c924e4/layout/painting/nsDisplayList.cpp#5438
Assignee | ||
Comment 8•5 years ago
|
||
Conceptually they're very similar to nsDisplayThemedBackground
though, I guess.
Assignee | ||
Comment 9•5 years ago
|
||
Should I just override that to return true and see how it looks like?
Assignee | ||
Comment 10•5 years ago
|
||
It does work much better indeed.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Similar to how we paint themed borders and backgrounds.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Updated•5 years ago
|
Comment 13•5 years ago
•
|
||
Backed out for perma fails on nsDisplayList.h.
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284080994&repo=autoland&lineNumber=1140
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284082963&repo=autoland&lineNumber=1502
Backout: https://hg.mozilla.org/integration/autoland/rev/e14d491c51f7d3d0236383c6bfcb4a7266562892
Assignee | ||
Comment 14•5 years ago
|
||
This is a pre-requisite cleanup, as the FrameLayerBuilder code ends up calling
this unconditionally, and thus the assertion on the other patch can end up
failing. Hopefully it's dead code, though, so no big deal.
Tweak the WebRender code to avoid two virtual calls in the common path, too.
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e87b85be662d
https://hg.mozilla.org/mozilla-central/rev/adeaa48edc50
Updated•5 years ago
|
Description
•