Open Bug 1719169 Opened 3 years ago Updated 2 years ago

Scrolling past images makes scrolling choppy

Categories

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

Firefox 91
defect

Tracking

()

Tracking Status
firefox91 --- affected

People

(Reporter: nagisa, Unassigned)

References

(Blocks 1 open bug, )

Details

Basic information

APZ scrolling when images are in the viewport is significantly more choppy and stuttery (at least on power) compared to scrolling parts of the page without images.

Steps to Reproduce:

  1. Obtain a Intel(R) Core(TM) i5-10210U or similar, limited to 5W of power;
    • This can be emulated by setting CPU MSRs accordingly via e.g. writing to /sys/class/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw
  2. Go to https://github.com/phaazon/hop.nvim/tree/0e9d4b4585f8a37d6cccbe9dd5993900b96a595b
  3. Scroll around (must support APZ/pixel perfect scrolling)

Expected Results:

Scrolling throughout the page is equally smooth at all times.

Actual Results:

When there are images in the viewport, scrolling becomes visibly choppy/stuttery.

More information

Screenshot: https://photos.app.goo.gl/tDJVeAdW4d921nHW7

Profile URL: N/A, profiling has too much overhead to profile on this machine.

Basic systems configuration:

OS version: NixOS (at 75dc3bbdd4f51d5c647491f8c39ca653c0657523), sway, wayland.

GPU model: Whatever is in Intel(R) Core(TM) i5-10210U

Number of cores: 4 physical, 8 logical

Amount of memory (RAM):16G

A profile: https://share.firefox.dev/3hhdVAE

First half was scrolling around the top part of the page, and the second half is in the area with the images. I must note, however that during the profiling the entire firefox became a big stutterfest due to the profiling overhead.

https://share.firefox.dev/3yqDwwS
Profile on my Wintelx64 +IGP laptop

Component: Performance → Graphics: WebRender

Non-wr felt smoother to me.

Severity: -- → S4
Priority: -- → P4
Blocks: wr-perf

A lot of time is spent in UpdateSubResource. https://share.firefox.dev/3hFUB0l

Blocks: texture-upload-perf
No longer blocks: wr-perf

Those GIFs are great for showing off the slow render path!

Just view one in its own tab e.g. : https://camo.githubusercontent.com/ff85d7ee2c7239380904746610ca869bf031049ea0ad8feb946b98ec67b28823/68747470733a2f2f706861617a6f6e2e6e65742f6d656469612f75706c6f6164732f686f705f76697375616c5f657874656e642e676966
gfx.webrender.debug.profiler=true

I get 23fps. Chrome does a little better at 52fps. These are definitely browser-killers! :-P
My guess is that those with fast enough CPUs that can maintain at least 60fps on a 60hz display won't notice the vsync stutter - with the GIFs directly or with that github page. With 23fps on my 144hz monitor; vsync stutter is nasty.

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