Bad performance around covid map on theguardian.com
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: perf:resource-use, Whiteboard: [wfh])
Attachments
(2 files)
+++ This bug was initially created as a clone of Bug #1627453 +++
Enable WR
Go to the URL
Scroll on the page
ER: Smooth scrolling
AR: When the interactive map of the USA is on the screen, the scrolling is very janky
Reporter | ||
Comment 1•4 years ago
|
||
Scrolling with the touchpad : https://perfht.ml/3aJkB4W
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Nical, just NI-ing you here to look at for perf triage at some point
Updated•4 years ago
|
Comment 4•4 years ago
|
||
The janky frames have more than 2k draw calls, looks like a batching issue.
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Also each dot on the map goes into its own blob image. making various things slow a allocating a ton of texture memory since the slab allocator wastes a lot of memory for each tiny allocation.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Comment 8•4 years ago
|
||
It looks like it's this code https://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderCommandBuilder.cpp#1140 and aParentActive = true that's making all of the dots active.
Comment 9•4 years ago
|
||
Summary from the matrix discussion:
- Each dot has mix-blend:multiply causing a thousands draw calls intrelaved with read-backs.
- CSS mix-blend modes are hard to implement with hardware blending equations because of the extra over step.
- It can be implemented in a single pass with the texture barrier extension provided the shader reads and writes the same pixel at each invocation (which is the case).
- the other approach is to say there is only so much we can do to make this type of content fast, and try to mitigate the issue with more efficient caching/invalidation. At the moment invalidating a piece of the map appears to invalidate all picture cache tiles overlapping with the map.
Doing both the texture barrier optimization and imprving invalidation would be valuable.
Comment 10•4 years ago
|
||
If we can't use the texture barrier extension, we could in principle batch together mix-blend elements that don't overlap, but I suspect it wouldn't be enough.
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Marking qf:p1 for the same reason as https://bugzilla.mozilla.org/show_bug.cgi?id=1627453#c9
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3
(Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3
(normal.)
Comment 13•3 years ago
|
||
We tested the site again on both desktop and Andriod, looks like it's no longer an issue, so closing this out.
Please free feel to reopen!
Comment 14•3 years ago
|
||
Glenn and Nical, we did a lot of work on mix-blend since a year ago, and also specifically some things to make mix-blend:multiply fast even on hardware without advanced-blend-equation support. Does that seem like what likely resolved this here?
Updated•2 years ago
|
Description
•