Closed Bug 1620895 Opened 4 years ago Closed 3 years ago

Scrolling on https://twitter.com/home is not smooth on macOS (WebRender on)

Categories

(Core :: Graphics: WebRender, defect, P2)

75 Branch
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox78 --- wontfix

People

(Reporter: hujq, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Set gfx.webrender.all=true
Open https://twitter.com/home and scroll down and up with trackpad on the center column (the timeline).

Actual results:

The scrolling is not smooth.
Profile: https://perfht.ml/38FGyA8

Expected results:

The scrolling should be smooth, like in Safari and Chrome which can have 60fps most of the time.
With WebRender off, the scrolling smoothness is slightly better, although new content takes a longer time to show up.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Priority: -- → P2

hujq, thanks for reporting this. I think we need some more information.

Could you visit the page about:support, click "Copy text to clipboard", and attach it to this bug? (If you just try to paste it into a bugzilla comment field, Bugzilla will automatically offer to make it into an attachment, since it's long.)

Also, the profile you linked doesn't contain any information about the WebRender threads. You need to explicitly tell the profiler to record their activity. Could you start the profiler and add the text "WR" to the "custom threads" field, as shown in the attachment?

Flags: needinfo?(hujq)

Also: does the scrolling improve if you set the config 'gfx.webrender.compositor' to 'true'?

Attached file about:support
Attached image screenshot.png

Here are the new profiles with settings exactly the same as the above screenshot.
Also, 'gfx.webrender.compositor' doesn't seem to improve it.

gfx.webrender.compositor=false
https://perfht.ml/2va6gyL

gfx.webrender.compositor=true
https://perfht.ml/3cMUE5V

Flags: needinfo?(hujq)

Nical, let me know if anything stands out in the profiles

Flags: needinfo?(nical.bugzilla)

hujq, can you also add the "Renderer" thread and redo the profiles?

Flags: needinfo?(hujq)

Frame building does not appear to be a bottleneck in this profile.
The main thread is pretty busy with javascript, if all CPU cores are busy it can happen that webrender works gets scheduled a bit heratically causing vsyncs to be missed and frame jank.

I did a quick profile locally and the render is rather busy on my laptop, spending a good amount of time uploading uniform buffers just before each draw call and in the draw calls submissions themselves.

The GPU is quite busy. Most of the time spent in the image and composite shaders. Picture caching is able to save work some of the frames but frequently large portions of the screen are invalidated and I suspect these are the janky frames. It's hard to guess whether over-invalidation would be easy to fix on our end or if the twitter website is doing silly things in JS. Worth investigating though.

Blocks: wr-perf
Flags: needinfo?(nical.bugzilla)

"Renderer" thread added.

gfx.webrender.compositor=false
https://perfht.ml/2TPvnkb

gfx.webrender.compositor=true
https://perfht.ml/3aRb1wr

Not sure if this is relevant, but if I make the width of the window smaller so that the left column is shrunk to icons only and the right column is hidden, the scrolling becomes much better, especially when it's not loading new content.
https://perfht.ml/33lo9Yi

Flags: needinfo?(hujq)
Blocks: wr-76
No longer blocks: wr-75
Summary: Scrolling on https://twitter.com/home is not smooth (WebRender on) → Scrolling on https://twitter.com/home is not smooth on macOS (WebRender on)
No longer blocks: wr-76
Blocks: wr-perf-graveyard
No longer blocks: wr-perf
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: