Closed Bug 1210496 Opened 6 years ago Closed 5 years ago

Extremely slow scrolling on reddit/cats with Linux APZ

Categories

(Core :: Panning and Zooming, defect)

Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: azakai, Unassigned)

References

Details

As of updating nightly to 2015-10-01, scrolling the cats subreddit is extremely slow. There is a very noticeable pause before there is a response to clicking pageup or pagedown, and the scroll completes in what looks like 2 very slow frames instead of smoothly.

https://www.reddit.com/r/cats/
Restarting firefox helps, but after viewing a bunch of cat pics and scrolling around for a while, the sluggishness returns.

Restarting with layers acceleration off avoids the problem.
Looks fine on mac. A mozregression and your about:support would help here.
Regarding regression, I see this in this nightly, but did not see it in yesterdays. Here is about:support:

Application Basics
------------------

Name: Firefox
Version: 44.0a1
Build ID: 20151001030236
Update Channel: nightly
User Agent: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0
Multiprocess Windows: 2/2 (default: true)
Safe Mode: false

Graphics
--------

Adapter Description: NVIDIA Corporation -- GeForce 9300M GS/PCIe/SSE2
Asynchronous Pan/Zoom: wheel input enabled
Device ID: GeForce 9300M GS/PCIe/SSE2
Driver Version: 3.3.0 NVIDIA 304.125
GPU Accelerated Windows: 0/2 Basic (OMTC)
Supports Hardware H264 Decoding: No;
Vendor ID: NVIDIA Corporation
WebGL Renderer: NVIDIA Corporation -- GeForce 9300M GS/PCIe/SSE2
windowLayerManagerRemote: true
AzureCanvasBackend: cairo
AzureContentBackend: cairo
AzureFallbackCanvasBackend: none
AzureSkiaAccelerated: 0
CairoUseXRender: 1

Important Modified Preferences
------------------------------

accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 204800
browser.cache.disk.filesystem_reported: 1
browser.cache.disk.smart_size_cached_value: 225280
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.cache.frecency_experiment: 2
browser.download.importedFromSqlite: true
browser.places.smartBookmarksVersion: 7
browser.sessionstore.upgradeBackup.latestBuildID: 20151001030236
browser.startup.homepage_override.buildID: 20151001030236
browser.startup.homepage_override.mstone: 44.0a1
browser.tabs.warnOnClose: false
browser.urlbar.suggest.searches: true
browser.urlbar.userMadeSearchSuggestionsChoice: true
dom.apps.reset-permissions: true
dom.ipc.plugins.asyncInit: true
dom.max_script_run_time: 5
dom.mozApps.maxLocalId: 1001
dom.mozApps.used: true
extensions.lastAppVersion: 44.0a1
font.internaluseonly.changed: false
gfx.crash-guard.glcontext.appVersion: 43.0a1
gfx.crash-guard.glcontext.deviceID: GeForce 9300M GS/PCIe/SSE2
gfx.crash-guard.glcontext.driverVersion: 3.3.0 NVIDIA 304.125
gfx.crash-guard.status.glcontext: 2
layers.acceleration.disabled: true
media.gmp-gmpopenh264.lastUpdate: 1432411834
media.gmp-gmpopenh264.path: /home/alon/.mozilla/firefox/6u6kfo9y.default/gmp-gmpopenh264
media.gmp-gmpopenh264.version: 1.4
media.gmp-manager.buildID: 20151001030236
media.gmp-manager.lastCheck: 1443722412
media.webrtc.debug.aec_log_dir: /tmp/
media.webrtc.debug.log_file: /tmp/WebRTC.log
network.cookie.prefsMigrated: true
network.predictor.cleaned-up: true
places.database.lastMaintenance: 1443080848
places.history.expiration.transient_current_max_pages: 5518
plugin.disable_full_page_plugin_for_types: application/pdf
plugin.importedState: true
plugin.state.flash: 1
print.print_bgcolor: false
print.print_bgimages: false
print.print_colorspace: default
print.print_downloadfonts: false
print.print_duplex: 0
print.print_evenpages: true
print.print_in_color: true
print.print_margin_bottom: 0.500000012107193
print.print_margin_left: 0.500000012107193
print.print_margin_right: 0.500000012107193
print.print_margin_top: 0.500000012107193
print.print_oddpages: true
print.print_orientation: 0
print.print_page_delay: 50
print.print_paper_data: 0
print.print_paper_height: 279.40
print.print_paper_name: na_letter
print.print_paper_size_type: 1
print.print_paper_size_unit: 1
print.print_paper_width: 215.90
print.print_plex_name: default
print.print_resolution_name: default
print.print_scaling: 1.00
print.print_shrink_to_fit: true
print.print_to_file: false
print.print_unwriteable_margin_bottom: 56
print.print_unwriteable_margin_left: 25
print.print_unwriteable_margin_right: 25
print.print_unwriteable_margin_top: 25
print.tmp.printerfeatures.PostScript/default.can_change_colorspace: false
print.tmp.printerfeatures.PostScript/default.can_change_downloadfonts: false
print.tmp.printerfeatures.PostScript/default.can_change_jobtitle: false
print.tmp.printerfeatures.PostScript/default.can_change_num_copies: true
print.tmp.printerfeatures.PostScript/default.can_change_orientation: true
print.tmp.printerfeatures.PostScript/default.can_change_paper_size: true
print.tmp.printerfeatures.PostScript/default.can_change_plex: false
print.tmp.printerfeatures.PostScript/default.can_change_printincolor: true
print.tmp.printerfeatures.PostScript/default.can_change_resolution: false
print.tmp.printerfeatures.PostScript/default.can_change_spoolercommand: true
print.tmp.printerfeatures.PostScript/default.colorspace.0.name: default
print.tmp.printerfeatures.PostScript/default.colorspace.count: 1
print.tmp.printerfeatures.PostScript/default.has_special_printerfeatures: true
print.tmp.printerfeatures.PostScript/default.orientation.0.name: portrait
print.tmp.printerfeatures.PostScript/default.orientation.1.name: landscape
print.tmp.printerfeatures.PostScript/default.orientation.count: 2
print.tmp.printerfeatures.PostScript/default.paper.0.height_mm: 210
print.tmp.printerfeatures.PostScript/default.paper.0.is_inch: false
print.tmp.printerfeatures.PostScript/default.paper.0.name: A5
print.tmp.printerfeatures.PostScript/default.paper.0.width_mm: 148
print.tmp.printerfeatures.PostScript/default.paper.1.height_mm: 297
print.tmp.printerfeatures.PostScript/default.paper.1.is_inch: false
print.tmp.printerfeatures.PostScript/default.paper.1.name: A4
print.tmp.printerfeatures.PostScript/default.paper.1.width_mm: 210
print.tmp.printerfeatures.PostScript/default.paper.2.height_mm: 420
print.tmp.printerfeatures.PostScript/default.paper.2.is_inch: false
print.tmp.printerfeatures.PostScript/default.paper.2.name: A3
print.tmp.printerfeatures.PostScript/default.paper.2.width_mm: 297
print.tmp.printerfeatures.PostScript/default.paper.3.height_mm: 279
print.tmp.printerfeatures.PostScript/default.paper.3.is_inch: true
print.tmp.printerfeatures.PostScript/default.paper.3.name: Letter
print.tmp.printerfeatures.PostScript/default.paper.3.width_mm: 215
print.tmp.printerfeatures.PostScript/default.paper.4.height_mm: 355
print.tmp.printerfeatures.PostScript/default.paper.4.is_inch: true
print.tmp.printerfeatures.PostScript/default.paper.4.name: Legal
print.tmp.printerfeatures.PostScript/default.paper.4.width_mm: 215
print.tmp.printerfeatures.PostScript/default.paper.5.height_mm: 431
print.tmp.printerfeatures.PostScript/default.paper.5.is_inch: true
print.tmp.printerfeatures.PostScript/default.paper.5.name: Tabloid
print.tmp.printerfeatures.PostScript/default.paper.5.width_mm: 279
print.tmp.printerfeatures.PostScript/default.paper.6.height_mm: 254
print.tmp.printerfeatures.PostScript/default.paper.6.is_inch: true
print.tmp.printerfeatures.PostScript/default.paper.6.name: Executive
print.tmp.printerfeatures.PostScript/default.paper.6.width_mm: 190
print.tmp.printerfeatures.PostScript/default.paper.count: 7
print.tmp.printerfeatures.PostScript/default.plex.0.name: default
print.tmp.printerfeatures.PostScript/default.plex.count: 1
print.tmp.printerfeatures.PostScript/default.resolution.0.name: default
print.tmp.printerfeatures.PostScript/default.resolution.count: 1
print.tmp.printerfeatures.PostScript/default.supports_colorspace_change: false
print.tmp.printerfeatures.PostScript/default.supports_downloadfonts_change: false
print.tmp.printerfeatures.PostScript/default.supports_jobtitle_change: false
print.tmp.printerfeatures.PostScript/default.supports_orientation_change: true
print.tmp.printerfeatures.PostScript/default.supports_paper_size_change: true
print.tmp.printerfeatures.PostScript/default.supports_plex_change: false
print.tmp.printerfeatures.PostScript/default.supports_printincolor_change: true
print.tmp.printerfeatures.PostScript/default.supports_resolution_change: false
print.tmp.printerfeatures.PostScript/default.supports_spoolercommand_change: true
privacy.cpd.cookies: false
privacy.cpd.downloads: false
privacy.cpd.formdata: false
privacy.cpd.history: false
privacy.cpd.offlineApps: true
privacy.cpd.sessions: false
privacy.donottrackheader.enabled: true
privacy.popups.showBrowserMessage: false
privacy.sanitize.migrateClearSavedPwdsOnExit: true
privacy.sanitize.migrateFx3Prefs: true
privacy.sanitize.timeSpan: 0
privacy.trackingprotection.enabled: true
security.ssl.errorReporting.automatic: true
security.warn_viewing_mixed: false
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1443340049

Important Locked Preferences
----------------------------

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 0

Library Versions
----------------

NSPR
Expected minimum version: 4.10.9
Version in use: 4.10.9

NSS
Expected minimum version: 3.20 Basic ECC
Version in use: 3.20 Basic ECC

NSSSMIME
Expected minimum version: 3.20 Basic ECC
Version in use: 3.20 Basic ECC

NSSSSL
Expected minimum version: 3.20 Basic ECC
Version in use: 3.20 Basic ECC

NSSUTIL
Expected minimum version: 3.20
Version in use: 3.20

Experimental Features
---------------------

Name: Invisible test of the experiment branching system.
ID: experiment-branch-test-nightly@experiments.mozilla.org
Description: An experiment using branches just to test whether branches get saved correctly.
Active: false
End Date: 1409361330156
Homepage:

Sandbox
-------

Seccomp-BPF (System Call Filtering): true
Seccomp Thread Synchronization: true
User Namespaces: true
Media Plugin Sandboxing: true
mozregression will dig down to the individual changeset which is a lot more useful then a day window.

I was expecting windows but since it's Linux I think the timeframe fits with APZ on linux. Try restoring default (layers acceleration) and disabling APZ:
layers.async-pan-zoom.enabled;false

If so then it's caused by bug 1143856.
Thanks, it does look like an APZ on Linux issue, after doing some testing. And the timing is perfect.

I didn't know that mozregression could bisect even between nightlies, that a nice feature. But, this problem takes a while to show itself - I need to browse for a while before it gets bad enough to notice - so it would take a lot of time to bisect it. Let me know though if it would be useful enough to justify the time.
Blocks: apz-linux
OS: Unspecified → Linux
Summary: Extremely slow scrolling on reddit/cats on latest nightly → Extremely slow scrolling on reddit/cats with Linux APZ
(In reply to Alon Zakai (:azakai) from comment #5)
> Let me know though if it would be useful enough to
> justify the time.

No need - this is certainly a result of APZ. However I would like some clarification on the STR - you said it happens when "clicking pageup or pagedown". Does that mean you're clicking on the scrollbar track above/below the scrollthumb? Is that the only time the slowness happens, or does it also reproduce with other scrolling methods? I'm interested in scroll-wheel scrolling in particular. Finally, do you have the "smooth scroll" setting enabled under "Advanced" in the Firefox preferences?
I meant literally clicking the pageup and pagedown keys on the keyboard. That's the only way I scroll. (I don't have a mouse with a scrollbutton, and ever since Firefox uses gtk3, the scroll bar itself is just a bar that when I click on a location, it jumps to that absolute position, instead of scrolling towards it. There are also no scroll arrows to click on.)

"Smooth scrolling" is on. I don't remember turning it on, so either it's the default or I did it a very long time ago ;)
Total guess: I wonder if the delays are the APZ input block timeouts. I did see something similar when implementing the input blocks.

Does the delay feel like roughly 300ms by any chance?
The input block timeouts shouldn't affect keyboard input. My guess is this is just slow painting, although I'm not sure why it gets slower over time. Does the memory usage also go up over time? It might be a leak somewhere.
Component: Graphics → Panning and Zooming
The delays could be in the order of magnitude of 300ms, but I can't guess how close.

I don't see memory usage go up. I do see the CPU being used heavily during the pauses.
Alon, could you set apz.minimap.enabled to true and see how big the render(display) port is, relative to the total page size? It'll be the bright grey box against the darker grey background, at the upper-left of the browser window.

On my laptop the entire page is covered by the displayport. APZ scrolling is smooth. As soon as I hit PGUP/PGDN, the displayport seems to reposition itself such that a good chunk is cut off. For example if I PGDN then the top half of the page is no longer painted, and it has to be repainted when I PGUP.

It sounds like we're hitting some painting performance problem here but I'd bet we're also being inefficient with displayport margins during main thread scrolling.
I have actually stopped seeing this problem (on this website or any other), it's been a few days since I could notice it. I'm not sure what changed, except perhaps a nightly update? I guess this can be closed WORKSFORME if no one else sees the issue on that site.
Flags: needinfo?(azakai)
Closing WFM. David, feel free to file follow-ups for the other issues in comment 11 if you have STR.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.