All users were logged out of Bugzilla on October 13th, 2018

Scrolling using scrollbar thumb on long pages results in heavy checkerboarding

NEW
Unassigned

Status

()

P3
normal
3 years ago
a year ago

People

(Reporter: jimm, Unassigned)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted], URL)

Attachments

(2 attachments)

13.42 KB, text/plain
Details
201.60 KB, application/x-zip-compressed
Details
(Reporter)

Description

3 years ago
Created attachment 8724091 [details]
aboutsupport.txt

STR:

1) enable apz.drag.enabled
2) open a large DXR page and scroll using the thumb [1]

result: content paint fails to keep up with scroll position

[1] http://mxr.mozilla.org/mozilla-central/source/widget/gtk/nsWindow.cpp
Keywords: perf
Whiteboard: [gfx-noted]
OS: Unspecified → Windows
(In reply to Jim Mathies [:jimm] from comment #0)
> 2) open a large DXR page and scroll using the thumb [1]
> 
> [1] http://mxr.mozilla.org/mozilla-central/source/widget/gtk/nsWindow.cpp

(The link is to an MXR page, but I see the checkerboarding on both MXR and DXR.)
This might just regular checkerboarding appearing worse due to the fact that on a very long page, scrollbar dragging allows you to scroll a lot more with the same mouse movement.

Comment 3

2 years ago
This is the only bug I could reproduce of those remaining for async-scrollbar-drag. However, the same also happens with touch scrolling, so this seems to be a universal APZ issue.

Based on a quick look around, it seems maybe this falls more cleanly under Bug 1256677. What do you think, Botond?
Flags: needinfo?(botond)
(In reply to Kevin Wern from comment #3)
> This is the only bug I could reproduce of those remaining for
> async-scrollbar-drag. However, the same also happens with touch scrolling,
> so this seems to be a universal APZ issue.
> 
> Based on a quick look around, it seems maybe this falls more cleanly under
> Bug 1256677. What do you think, Botond?

Checkerboarding is indeed a universal APZ issue, and bug 1256677 tracks it in general.

This bug is on file because checkerboarding can be worse with scrollbar dragging than with other input methods. The reason is that with scrollbar dragging, you can scroll the content at an arbitrarily fast speed (since a fixed number of pixels in "scroll track space" can map onto an arbitrarily large number of pixels of scrolling, if the page is long enough).

Unfortunately, that also means checkerboarding is particularly difficult to solve for scrollbar dragging. We can't paint the entire page for long pages, and we can't really predict where the user will end up dragging to try to paint that region.

One possible mitigation may be to use "low-resolution painting", where we paint a larger region of the page than we otherwise would, at a lower resolution (think blurry text etc.) and show that during high-speed scrolling, then replace it with high-resolution painted content once the scrolling slows down. We have existing infrastructure to do this on Android (for fast flings) that we could try on desktop as well.

That said, this solution may be somewhat involved, and I don't think we should necessarily block enabling apz scrollbar dragging on it. We can enable it, see how widespread of an issue it is, and then decide if we'd like to employ the mitigation approach mentioned above, or do something else.
Flags: needinfo?(botond)
(In reply to Kevin Wern from comment #3)
> This is the only bug I could reproduce of those remaining for
> async-scrollbar-drag.

I think we should be in good shape to enable scrollbar dragging on Nightly. If people end up running into those remaining hard-to-reproduce bugs, they will hopefully be able to provide URLs / testcases that will allow us to reproduce them.
(In reply to Botond Ballo [:botond] from comment #5)
> I think we should be in good shape to enable scrollbar dragging on Nightly.
> If people end up running into those remaining hard-to-reproduce bugs, they
> will hopefully be able to provide URLs / testcases that will allow us to
> reproduce them.

Filed bug 1324117 for this.

Updated

2 years ago
Summary: Scroll using scrollbar thumb on DXR pages result in heavy checkerboarding → Scrolling using scrollbar thumb on long pages results in heavy checkerboarding
I experience this bug on https://metrics.mozilla.com/firefox-hardware-report/ (Dell XPS 13 9350, Linux, today's Nightly)

Here's a video of how it looks: https://us-next.owncube.com/index.php/s/pfIDvNmQnhMWBne
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #7)
> Here's a video of how it looks:
> https://us-next.owncube.com/index.php/s/pfIDvNmQnhMWBne

Note that this bug is specifically about scrolling by dragging the scroll thumb. In your video it looks like you're scrolling via mousewheel or some other mechanism because the mouse cursor is over the web content and nowhere near the scrollbar.

That being said, yes, your video shows checkerboarding. See bug 1256677 for how we're tracking that.
Yes, I was using a two-finger scroll on my trackpad.

> That being said, yes, your video shows checkerboarding. See bug 1256677 for how we're tracking that.

I'm not sure if that means I should file a new bug or is that already tracked?
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #9)
> I'm not sure if that means I should file a new bug or is that already
> tracked?

Based on the video you posted I would say it's already tracked. It didn't look like an "exceptional" case that would deserve a new bug and investigation.
After a discussion with Kats on https://bugzilla.mozilla.org/show_bug.cgi?id=1349236#c7, I will add here a test case in order to verify this issue when the bug is fixed. 


Tested on Mac OS X 10.10, MacBook Pro 10.12, Windows 10x64 using Nightly 55.0a1(2017-03-21).

STR: 

1. Open Firefox and go to:
https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-linux-debug/1482891457/mozilla-inbound_ubuntu32_vm-debug_test-gtest-bm07-tests1-linux32-build277.txt.gz 
2. Drag the scrollbar(you can use the mouse/touchscreen) and move it fast up and down. 
 
Expected result: The text is properly displayed, without any delay.

Actual result: The text it has some delay in displaying the context.
Duplicate of this bug: 1351336
The example page from bug 1365246 is a good testcase for this.
Duplicate of this bug: 1365246

Comment 15

a year ago
Created attachment 8869034 [details]
prep.zip

This is another example that shows extremely bad checker-boarding when scrolling by dragging the scrollbar by mouse.
(This testcase is from some very old bugzilla bug, FWIW)
You need to log in before you can comment on or make changes to this bug.