Open Bug 1732817 Opened 3 years ago Updated 2 years ago

Scrolling on apple.com is much less smooth on fenix than in chrome with backdrop-filter

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
Android
defect

Tracking

()

Performance Impact none
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- unaffected
firefox94 --- disabled

People

(Reporter: mcomella, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Here's a video: https://drive.google.com/file/d/1MTnT0YuDbGZrQ0riAKHIoSnmyZPwk7DX/view?usp=sharing

edit: I waited a longer delay after clearing data to ensure the WebRender shaders were compiled: https://drive.google.com/file/d/11VPnxrNYjmOYIWZIb8En7LSOQby7mJMf/view?usp=sharing It's slightly better but still not great compared to Chrome.

It's from a Moto G5. The video is pretty representative of what it looks like on device. Chrome is smooth (though drops an occasional frame) and it's really slow on fenix.

This is 2021-09-27 Nightly.

Guessing it's a gfx perf problem.

Component: Panning and Zooming → Graphics: WebRender

Here's a profile: https://share.firefox.dev/3AMCGw1

There are long composite times so I'm going to guess graphics too.

Can you please retake the profile using the "Firefox Graphics" preset? The screenshots in the default settings take a significant amount of time.

Flags: needinfo?(michael.l.comella)
Flags: needinfo?(michael.l.comella) → needinfo?(jnicol)

Thanks!

Since bug 1729894 landed (enabling backdrop filter), picture caching doesn't work very well on this page due to the presence of a backdrop filter. This means the entire page is rendered for every scroll, which is slow.

Michael, could you please see if setting layout.css.backdrop-filter.enabled to false helps things? I think it should, though there may still be work to do after that.

My understanding of backdrop-filter is basically non-existent, both in terms of the spec and webrender's implementation. But I guess if the background is fixed and the element is scrolling then there's not much we can do to avoid invalidating everything on scroll. Perhaps we could still place the scrolling elements in a different picture cache slice than the background, and then only the tiles of the background that intersect with the filtered element would be invalidated. Does that sound like it would be possible, Glenn?

I cannot actually see where the filter is on this page, however, so I'll dig a bit more in to that.

Flags: needinfo?(michael.l.comella)
Flags: needinfo?(jnicol)
Flags: needinfo?(gwatson)
Regressed by: 1729894
Has Regression Range: --- → yes

Possibly can dup this as bug 1628046

Set release status flags based on info from the regressing bug 1729894

Yea, I've come to understand that there are some significant issues with the current backdrop-filter impl, especially those picture cache interactions.

I have a rough plan in my head of how we could refactor / re-implement this feature to fix these, but I'm yet to write them down.

It's unlikely I'll have time in the near future to work on this, however it could be an interesting / fun project for someone else to work on. I'll check around the gfx team and see if we can find someone with cycles to do this work.

Flags: needinfo?(gwatson)

Hey Glenn and Jamie, I’m an engineering manager at Webflow and have been following the Firefox landing of backdrop-filter support so we can release support for designing with this feature.

Would there be interest in prioritizing this through sponsorship if I can allocate funds or through having a Webflow engineer support this work?

(In reply to Jamie Nicol [:jnicol] from comment #5)

Michael, could you please see if setting layout.css.backdrop-filter.enabled to false helps things? I think it should, though there may still be work to do after that.

Using the 9/29 nightly, I cannot reproduce with it set to false.

It looks like the regressing feature was temporarily disabled in bug 1733340 and, as expected, I cannot reproduce in more recent nightlies (e.g. 10/7).

Flags: needinfo?(michael.l.comella)
Blocks: gfx-triage

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Summary: Scrolling on apple.com is much less smooth on fenix than in chrome → Scrolling on apple.com is much less smooth on fenix than in chrome with backdrop-filter
Whiteboard: [qf] → [qf-]

(In reply to dustan.kasten from comment #9)

Hey Glenn and Jamie, I’m an engineering manager at Webflow and have been following the Firefox landing of backdrop-filter support so we can release support for designing with this feature.

Would there be interest in prioritizing this through sponsorship if I can allocate funds or through having a Webflow engineer support this work?

Thanks for reaching out! I've followed up by email.

Flags: needinfo?(jmathies)

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies)
No longer blocks: gfx-triage
Performance Impact: --- → -
Whiteboard: [qf-]

Michael, lots of new work on backdrop-filter has landed in Nightly. Are you still able to reproduce this bug in Fenix with layout.css.backdrop-filter.enabled set to true?

Flags: needinfo?(michael.l.comella)

(In reply to G from comment #14)

Michael, lots of new work on backdrop-filter has landed in Nightly. Are you still able to reproduce this bug in Fenix with layout.css.backdrop-filter.enabled set to true?

Nevermind and sorry for bugspam, backdrop-filter was disabled again in bug 1766710 so the above comment is irrelevant (for now).

Flags: needinfo?(michael.l.comella)

It got re-enabled in bug 1749625. Michael, would you mind testing this again?

Sebastian

Flags: needinfo?(michael.l.comella)

Scrolling on apple.com on my Moto G5 in:

They added a carousel to the bottom of the page that automatically switches between images. Some of the jank seems to be associated with that animation. Chrome handles it better than Firefox. Sorry for the delay!

Flags: needinfo?(michael.l.comella)

FWIW, this sluggish scrolling and performance overall also happens in Twitter with Fenix, both in latest Stable and Nightly. I thought it may be due to the fact that I'm using Android 5.1.1 that it's slow, but apparently it's due to backdrop-filter.

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