Scrolling is not smooth on privacyguides.org with backdrop-filter enabled
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | unaffected |
firefox102 | --- | unaffected |
firefox103 | --- | wontfix |
firefox104 | --- | fixed |
People
(Reporter: ksenia, Assigned: gw)
References
(Regression, )
Details
(Keywords: regression)
This was originally reported in https://github.com/webcompat/web-bugs/issues/106028
To reproduce, visit https://www.privacyguides.org/tools/ in Firefox Nightly 104.0a1 on Android and try to scroll down.
Expected:
Scrolling is smooth
Actual:
Scrolling is staggering
Mozregression result:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c2cd1e58dd94f78e6ed04798669635259a546964&tochange=e7cc9622ec6a955a42bb1e258ca2debb424bee57
Scrolling becomes smooth once I disable backdrop-filter
rule for .md-header
element or set layout.css.backdrop-filter.enabled
to false and restart the browser.
Also, this doesn't seem to be an issue on desktop, at least on MacOS.
Reporter | ||
Comment 1•3 years ago
|
||
Hi Glenn, wonder if you can take a look at this, please?
Assignee | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Set release status flags based on info from the regressing bug 1578503
Comment 3•3 years ago
|
||
Janky on desktop Windows too : https://share.firefox.dev/3yxYDyT
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Hi :gw, what's the severity/priority of this bug?
(next week is RC week for 103, the final 103 beta builds today)
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
I can reproduce locally. The main issue seems to be that we select a fixed position scroll root during picture cache assignment - this means that when scrolling we end up invalidating and redrawing everything every frame on this page. Next step will be to work out why we select a fixed position scroll root, which will determine whether this is a relatively simple bug fix or something more complex going on.
Assignee | ||
Comment 6•3 years ago
|
||
I have a relatively simple fix for that, but there's a second problem that is also causing slowness. We seem to be failing in batching or something like that, related to clip masks. The backdrop-filter issue just makes the batching issue more noticeable as we cache less things and constantly redraw. I'm seeing >4k draw calls on that frame during scrolling, so we need find the root cause of this and solve that too.
Assignee | ||
Comment 7•3 years ago
|
||
This also results in >1k alpha passes, which is shockingly high and clearly points towards a bug, given the site content.
Assignee | ||
Comment 8•3 years ago
|
||
The cause here is that the render task graph sort selects task render pass when they can be drawn safely, but doesn't move them earlier where possible. This trips up the current logic that decides whether to use a shared surface or not. Need to think of the best way to handle this, there's a few options.
Assignee | ||
Comment 9•3 years ago
|
||
I was wrong in comment 8 - the problem is a bit more subtle and tricky than that. The task graph sort does pop them in the correct order - but with backdrop-filter present, it's possible that tiles can end up in different passes, but require use of the same child task. This, combined with many segmented primitives on this page, where many of them have box-shadow masks, leads to a large number of tasks that don't get allocated on a shared surface.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
On a very high-end desktop, the frame time on this page was averaging ~17 ms. With the two changes above, this drops to ~3.5 ms. Mobile devices are likely to see the same or higher ratio performance improvement, since binding and resolving all those extra render targets is probably every more expensive on those GPUs.
Comment 11•3 years ago
|
||
Profile with latest nightly : https://share.firefox.dev/3v80s4B
Assignee | ||
Comment 12•3 years ago
|
||
That profile looks good to me, from a quick scan - did it feel like it was smooth on your machine now?
Comment 13•3 years ago
|
||
It was quite smooth on my high-end laptop. Might be worthwhile to test it on a mobile phone, which was the device used by the original reporter.
@ :ksenia, could you please test the latest nightly on an android mobile phone and see if the performance is better now?
Reporter | ||
Comment 14•3 years ago
|
||
Yes, it is much better, I don't observe any staggering when scrolling the page in the latest Nightly on my Android device anymore.
Thanks for looking into this!
Assignee | ||
Comment 15•3 years ago
|
||
Thanks for checking!
Updated•3 years ago
|
Description
•