Open Bug 1480964 Opened 6 years ago Updated 2 years ago

With WR, Scrolling on maze solver page is janky. Non-WR is smooth (WR scrolling is not async enough)

Categories

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

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Blocks 2 open bugs, )

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180803220259

Steps to reproduce:

1. enable WR
2. Go to https://testdrive-archive.azurewebsites.net/Performance/MazeSolver/Default.html
3. Select the 40x40 maze. Start it. Let it finish
4. After it finishes, it ill show something like "browser score: xx seconds", and the maze will keep on doing animation in the background

5. Scroll the page


Actual results:

Scrolling is super janky. 
https://perfht.ml/2OcTu6K with WR

Lots of APZC component in main thread


Expected results:

smooth, like the non-WR case: https://perfht.ml/2O7JYSe

Feel free to dupe this to other "WR scrolling is not async enough" bugs
Summary: With WR, Scrolling on maze solver page is janky. Non-WR is smooth → With WR, Scrolling on maze solver page is janky. Non-WR is smooth (WR scrolling is not async enough)
Flags: needinfo?(kats)
The UI process main thread sends a sync message to the "GeckoMain" thread (GPU process main thread), and that gets blocked on hit-testing, because the RenderBackend thread is busy doing various build/render stuff. Probably worth looking to see if there's things we can optimize in WR here.
Flags: needinfo?(kats)
Priority: -- → P2
Whiteboard: [gfx-noted]
Status: UNCONFIRMED → NEW
Ever confirmed: true
IMO, this should be high priority. People typically prefer whiteboarding/checkerboarding over stuttery scrolling.
(In reply to Mayank Bansal from comment #0)
> https://perfht.ml/2OcTu6K with WR

Thanks for the profile. For the future, could you add ",Renderer,WRSceneBuilder,WRRenderBackend" to your thread filter? This will make WR profiles more useful.
(In reply to Markus Stange [:mstange] from comment #3)
> (In reply to Mayank Bansal from comment #0)
> > https://perfht.ml/2OcTu6K with WR
> 
> Thanks for the profile. For the future, could you add
> ",Renderer,WRSceneBuilder,WRRenderBackend" to your thread filter? This will
> make WR profiles more useful.

I see that the profile already has those threads.. Am I reading the profile wrong, or missing something obvious?
Whoops! I was the one missing something obvious. Sorry. (I was looking in the wrong place, under the parent process instead of under the gpu process. Fooled by my own tool.)
Priority: P2 → P3
This should be better now. Can you retest and upload a new profile?
Flags: needinfo?(mayankleoboy1)
http://bit.ly/2IsPP2Y
Flags: needinfo?(mayankleoboy1) → needinfo?(jmuizelaar)
See Also: → 1497090, 1494163
Attached file lots-of-circle.html
Do you see similar slowness on this page?
Flags: needinfo?(jmuizelaar) → needinfo?(mayankleoboy1)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
Hovering tabs is a pain there: Tab backgrounds only change with a huge delay and red dots slow down then.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
> Created attachment 9017292 [details]
> lots-of-circle.html
> 
> Do you see similar slowness on this page?

Yes. As :darkspirit said, moving mouse inside the page was brutal. SCrolling also was slow. 

https://perfht.ml/2pT5IXJ
Flags: needinfo?(mayankleoboy1)
HEre is a profile where I scroll with scrollbar, scroll with mouse-pad with mouse inside the page, and just moving the mouse inside the page:

https://perfht.ml/2pWzOtC
Flags: needinfo?(jmuizelaar)
This should be somewhat better now? Can you retest?
Flags: needinfo?(jmuizelaar) → needinfo?(mayankleoboy1)
still bad. 
On the original maze solver page, the STR still reproduces.

On the testcase you created, if you move the mouse inside the page, the animation all but stops. If you scroll the page, it is super stuttery.
Flags: needinfo?(mayankleoboy1) → needinfo?(jmuizelaar)
Profile from today: https://perfht.ml/2SwuKIr 35+ms scene build times, similar amounts of time in the RenderBackend
Flags: needinfo?(jmuizelaar)
But a profile from today is much better: https://perfht.ml/2SvooZW
Priority: P3 → P4
here is a profile I took from the latest nightly :
https://perfht.ml/2PnQ1lR

Just to make clear, this profile is after the maze has completed and the animation is happening. Then you try to scroll the page.

And this profile is from your "lots of circles" test case. I scroll the page while the animation is happening:
https://perfht.ml/2Povei1

I dont see much improvement.
Priority: P4 → P5
See Also: → 1580178

with WR, smooth scrolling is no longer smooth on any webpage with longer scroll length, I experience this on both Nightly and Stable versions. This is the only thing stopping me from using WR on Firefox.

With latest nightly : https://perfht.ml/3biCyXT

This is much better now although not perfect. Most of the time on the render backend is now spent in clipping related stuff which is the focus of Glenn current work.

Severity: normal → S4
Priority: P5 → P3
Blocks: wr-frame-building-perf
No longer blocks: wr-perf
Blocks: 1782834

the attached testcase became significantly slower after Bug 1779952 : https://share.firefox.dev/3brPJeG

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

Attachment

General

Created:
Updated:
Size: