Opacity change performance regression on https://mullvad.net/de/

VERIFIED FIXED in Firefox 66

Status

()

defect
P2
normal
VERIFIED FIXED
5 months ago
3 months ago

People

(Reporter: darkspirit, Assigned: mattwoodrow)

Tracking

(Blocks 1 bug, {nightly-community, regression})

Trunk
mozilla66
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox64 unaffected, firefox65 unaffected, firefox66 verified, firefox67 verified)

Details

()

Attachments

(3 attachments)

Posted video first_bad.mp4
Debian Testing, X11, Macbook Pro

This opacity value will be updated as you scroll down or up:
> <div class="site-header-background" style="opacity: 0;"></div>

mozregression --good 2018-09-15 --bad 2018-12-28 --pref gfx.webrender.all:true -a https://mullvad.net/de/
> 12:27.56 INFO: Last good revision: 0e8109eaef4b4427272e284b6dc9ef17a0045a0f
> 12:27.56 INFO: First bad revision: 0d3d0fa680d8ed6dcf0875c57f8c54d4cebe19b4
> 12:27.56 INFO: Pushlog:
> https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0e8109eaef4b4427272e284b6dc9ef17a0045a0f&tochange=0d3d0fa680d8ed6dcf0875c57f8c54d4cebe19b4

> 0d3d0fa680d8	Matt Woodrow — Bug 1501382 - Cull items within an opacity:0 container when using WebRender. r=kats
> c62d53bdab79	Matt Woodrow — Bug 1501382 - Build display items within opacity:0 if we need them for APZ hit testing. r=kats
Posted video last_good.mp4
Flags: needinfo?(matt.woodrow)
Assignee: nobody → matt.woodrow
Priority: -- → P2
Assignee

Comment 2

5 months ago

This regressed because of https://hg.mozilla.org/integration/autoland/rev/c62d53bdab79.

The page has some opacity:0 content within SVG, and previously we skipped building this, but now we do.

Some of those invisible items are considerably bigger than the rest of the SVG, and we now include them in the size of the blob, so we spend a lot more time doing blob rasterization (mainly allocating and destroying memory for the tiles that don't actually get anything drawn to them).

The most obviously bad one is tour-content-illustration-toys-image.

There seem to be a lot of bugs here, none of which are particularly easy to fix:

  • nsDisplayOpacity items within SVG get optimized away (by nsSVGUtils::CanOptimizeOpacity), so we don't notice that the contained svg geometry is now entirely transparent.

  • If we fix that, we cull the geometry item, but nothing updates the bounds of the container display items outside of it, so the blob grouping code still thinks we have the larger bounds.

  • The SVG has a clip, but it's on the nsDisplayTransform, outside the nsDisplaySVGWrapper, so nobody knows that we can restrict our blob image size to it.

  • The transparent div (a 1000x1000 rect) also is clipped by something within the svg itself (the mask="url(#stars-mask)"), but the display list bounds aren't smart enough to understand this.

Assignee

Updated

5 months ago
Flags: needinfo?(matt.woodrow)

Comment 4

5 months ago
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b66f64e5709d
Skip building nsDisplaySVGGeometry display items when they have opacity:0. r=jwatt

Comment 6

5 months ago
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0871597bc67b
Skip building nsDisplaySVGGeometry display items when they have opacity:0. r=jwatt

Comment 7

4 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Reporter

Updated

4 months ago
Status: RESOLVED → VERIFIED
Assignee

Updated

4 months ago
Flags: needinfo?(matt.woodrow)

I managed to reproduce the issue using an older version of Nightly (2018-12-28) on macOS 10.14.
I retested everything using the latest Nightly 67.0a1 and beta 66.0b14 on the same platform. The bug is not reproducing anymore.

You need to log in before you can comment on or make changes to this bug.