Closed Bug 1295019 Opened 8 years ago Closed 8 years ago

[APZ] slowness of the effect of the keys Home and End for some websites

Categories

(Core :: Panning and Zooming, defect, P3)

48 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla51
Tracking Status
e10s + ---
firefox48 --- wontfix
firefox49 --- wontfix
firefox50 --- wontfix
firefox51 --- verified

People

(Reporter: ratm6, Assigned: kats)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, Whiteboard: [mozfr-community][gfx-noted])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0 Build ID: 20160726073904 Steps to reproduce: For instance when I am on one of these websites : https://www.freenews.fr/ or the forums of http://forums.mozfr.org, I type on the keys Home or End. Actual results: The scrolling is not direct, I don't go to the top or the bottom of the webpage directly, there is a delay when e10s is enabled. Expected results: I should go directly to the top or the bottom of the webpage while using the keys Home or End.
I'm using an Intel HD graphics 4600 with the latest drivers.
Summary: [e10s]slowness of the effect of the keys Home and End on some websites → [e10s]slowness of the effect of the keys Home and End for some websites
Application Basics ------------------ Name: Firefox Version: 51.0a1 Build ID: 20160813030202 Update Channel: nightly User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0 OS: Windows_NT 6.3 Multiprocess Windows: 1/1 (Enabled by default) Safe Mode: false Crash Reports for the Last 3 Days --------------------------------- All Crash Reports Extensions ---------- Name: FlyWeb Version: 1.0.0 Enabled: true ID: flyweb@mozilla.org Name: Multi-process staged rollout Version: 1.0 Enabled: true ID: e10srollout@mozilla.org Name: Pocket Version: 1.0.4 Enabled: true ID: firefox@getpocket.com Name: Web Compat Version: 1.0 Enabled: true ID: webcompat@mozilla.org Graphics -------- Features Compositing: Direct3D 11 Asynchronous Pan/Zoom: wheel input enabled; touch input enabled WebGL Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0) WebGL2 Renderer: WebGL creation failed: * Refused to create native OpenGL context because of blacklist entry: WEBGL_NATIVE_GL_OLD_INTEL * Exhausted GL driver options. Hardware H264 Decoding: No; Hardware video decoding disabled or blacklisted Audio Backend: wasapi Direct2D: true DirectWrite: true (6.3.9600.18123) GPU #1 Active: Yes Description: IGFX Vendor ID: 0x8086 Device ID: 0x0416 Driver Version: 10.18.14.4414 Driver Date: 3-23-2016 Drivers: igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32 Subsys ID: 1978103c RAM: Unknown GPU #2 Active: No Description: AMD Radeon HD 8600M Series Vendor ID: 0x1002 Device ID: 0x6660 Driver Version: 15.200.1062.1004 Driver Date: 8-3-2015 Drivers: aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64 Subsys ID: 0000000c RAM: 1024 Diagnostics AzureCanvasAccelerated: 0 AzureCanvasBackend: direct2d 1.1 AzureContentBackend: direct2d 1.1 AzureFallbackCanvasBackend: cairo Important Modified Preferences ------------------------------ browser.cache.disk.capacity: 358400 browser.cache.disk.filesystem_reported: 1 browser.cache.disk.smart_size.first_run: false browser.cache.disk.smart_size.use_old_max: false browser.cache.frecency_experiment: 4 browser.download.importedFromSqlite: true browser.places.smartBookmarksVersion: 8 browser.sessionstore.upgradeBackup.latestBuildID: 20160813030202 browser.startup.homepage_override.buildID: 20160813030202 browser.startup.homepage_override.mstone: 51.0a1 extensions.lastAppVersion: 51.0a1 media.gmp.storage.version.observed: 1 media.hardware-video-decoding.failed: true network.cookie.prefsMigrated: true places.history.expiration.transient_current_max_pages: 122334 plugin.disable_full_page_plugin_for_types: application/pdf plugin.importedState: true security.sandbox.content.tempDirSuffix: {9bab24cc-894a-4a1f-831b-4d00bcc4d4ac} Important Locked Preferences ---------------------------- Places Database --------------- JavaScript ---------- Incremental GC: true Accessibility ------------- Activated: false Prevent Accessibility: 0 Library Versions ---------------- NSPR Expected minimum version: 4.12 Version in use: 4.12 NSS Expected minimum version: 3.26 Version in use: 3.26 NSSSMIME Expected minimum version: 3.26 Version in use: 3.26 NSSSSL Expected minimum version: 3.26 Version in use: 3.26 NSSUTIL Expected minimum version: 3.26 Version in use: 3.26 Experimental Features ---------------------
Can reproduce this issue with a fresh profile with the following specs: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → Keyboard: Navigation
Product: Firefox → Core
Whiteboard: [mozfr-community]
Please note that if e10s is disabled the issue doesn't occur.
Can you please retest in the latest nightly to see if this is still happening?
Flags: needinfo?(ratm6)
Hmm that's difficult to judge... With my eyes I see a small improvement. That's smoother but there's a small delay when I go to https://forums.mozfr.org/viewforum.php?f=13 and I press End button. But less obvious than before.
Flags: needinfo?(ratm6)
I didn't observe this issue. Hi Grove, if you could manage to reproduce this, could you please get a profile according to [1]? [1] https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem
Flags: needinfo?(gwimberly)
Flags: needinfo?(mfunches)
Hi Hsin-Yi, Both Michelle and I tried the method you provided in Comment 7, and neither of us could get the Cleopatra UI to appear, it just provides a blank screen. Can you provide us with an alternative way to show the performance of the issue? Thanks!
Flags: needinfo?(mfunches)
Flags: needinfo?(htsai)
Flags: needinfo?(gwimberly)
(In reply to Grover Wimberly IV [:Grover-QA] from comment #8) > Hi Hsin-Yi, > > Both Michelle and I tried the method you provided in Comment 7, and neither > of us could get the Cleopatra UI to appear, it just provides a blank screen. > Can you provide us with an alternative way to show the performance of the > issue? Thanks! I encountered a problem on Cleopatra UI as well. The UI was hang on "Gathering unresolved symbols..." :( Hi Michael, I noticed you managed to acquire a profile by Cleopatra on another bug. Do you know if there's a missing step in the MDN article? Do you have any suggestions for Grove's comment 8? Thank you.
Flags: needinfo?(htsai) → needinfo?(michael)
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #9) > I encountered a problem on Cleopatra UI as well. The UI was hang on > "Gathering unresolved symbols..." :( > > Hi Michael, I noticed you managed to acquire a profile by Cleopatra on > another bug. Do you know if there's a missing step in the MDN article? Do > you have any suggestions for Grove's comment 8? Thank you. That seems odd to me. The instructions in the article seem accurate to me, I simply download and install the extension into a fresh profile, reproduce the perf problem, and hit the keyboard shortcut. Benoit might have a better idea of what might not be working for you?
Flags: needinfo?(michael) → needinfo?(bgirard)
It's because the server is down, see bug 1244589. I figured the watchdog script we added would fix it but apparently it hasn't. We really need to find a clear owner for it. I'll see what I can do.
Flags: needinfo?(bgirard)
Actually there's also another error causing this problem which has been patched. Update your add-on and restart the browser and it should be fine.
Thanks Benoit and Michael. I got the profile successfully after updating the add-on to v1.16.22 :) Hi Grover, would you give it a shot again?
Flags: needinfo?(gwimberly)
Here is the attached profile and results. Thanks! https://cleopatra.io/#report=68de7e473ebe67e1f89332fc2360811ac0c1cc9d
Flags: needinfo?(gwimberly)
Kats, something apz related? we don't consider this serious enough to block e10s.
Flags: needinfo?(bugmail)
Doesn't seem APZ related - scrolling via home/end is handled by the main thread, so latency there could be because of main-thread scripts running or because of slow paint. The profile doesn't really indicate much - I see a long displaylist build but I think that's just a bug in the profiler, I've seen that in other profiles too. I can't reproduce the problem locally either. If somebody who can reproduce the issue can try with e10s enabled but APZ disabled (layers.async-pan-zoom.enabled=false), that would help confirm or refute whether or not APZ is involved.
Flags: needinfo?(bugmail)
In nightly 51, with e10s enabled but APZ disabled, I don't get the issue. All is fine. Here's a profile : https://cleopatra.io/#report=11db0e55362ba3eb191b0294ec345244bee3adcd
Flags: needinfo?(bugmail)
Huh, interesting. Maybe it is APZ related then. Can you try it in the below configurations, and let me know if you see the problem? Configuration 1: - e10s enabled - layout.event-regions.enabled set to true - layers.async-pan-zoom.enabled set to false Configuration 2: - e10s enabled - layers.async-pan-zoom.enabled set to true - apz.x_skate_size_multiplier set to 0 - apz.x_stationary_size_multiplier set to 0 - apz.y_skate_size_multiplier set to 0 - apz.y_stationary_size_multiplier set to 0 Please make sure to restart your browser between configuring it as per the settings above and running the tests.
Flags: needinfo?(bugmail) → needinfo?(ratm6)
config 1: I see no problem. https://cleopatra.io/#report=352844c39d60e9374b5eef50935ab83073314f28 config 2: (with layout.event-regions.enabled set to default value which is false) I see a small problem. https://cleopatra.io/#report=850e9c26fa089746489b3107130f6ba8e97a8844
Flags: needinfo?(ratm6)
Flags: needinfo?(bugmail)
Thanks for the info! From this it sounds like the slowdown is coming from the extra displayport area that we need to paint when navigating via home/end. The extra displayport area is only necessary when APZ is enabled, which is why that's the only time the slowdown is visible. Reducing the displayport area (config 2) sounds like it improves the situation but doesn't fix it entirely, which is expected because the displayport is still going to be aligned to virtual tiles so there's some extra painting happening. Based on this diagnosis it should affect not just Firefox 51 but also some of the older versions, going back to 48 at least. And we should be able to improve this by applying displayport suppression during home/end scrolling animations, if I can find a good way to hook that up.
Component: Keyboard: Navigation → Panning and Zooming
Flags: needinfo?(bugmail)
Keywords: regression
Priority: -- → P3
Summary: [e10s]slowness of the effect of the keys Home and End for some websites → [APZ] slowness of the effect of the keys Home and End for some websites
Whiteboard: [mozfr-community] → [mozfr-community][gfx-noted]
Version: 51 Branch → 48 Branch
I kicked off a couple of try builds with possible fixes, to see if they help any. Since I'm unable to reproduce the problem myself they're kind of blind fixes, but hopefully at least one of them should help. https://treeherder.mozilla.org/#/jobs?repo=try&revision=db8f1dbed12d https://treeherder.mozilla.org/#/jobs?repo=try&revision=f4b90877563f Once these builds are done, please give them a try to see if either of them fixes the problem for you. You can access the build folder with the .zip by clicking on the green "B" (once the build is done) and then clicking on the "Build" link in the bottom-left pane that will pop up.
Flags: needinfo?(ratm6)
Hum i'm sorry but i don't understand how to download your builds. Please give me some URLs :) By the way I use nightly x64 for windows...
Flags: needinfo?(ratm6) → needinfo?(bugmail)
Sure, here are two x64 builds to try out: https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-db8f1dbed12db9ead33259b6e2be5ce60b3dc401/try-win64/firefox-51.0a1.en-US.win64.zip https://archive.mozilla.org/pub/firefox/try-builds/kgupta@mozilla.com-f4b90877563f109564b58e1bd774fa7136f8c9cd/try-win64/firefox-51.0a1.en-US.win64.zip Download the zip files, unzip them into some temp folder, and run the firefox.exe inside. You can use them on a new profile or your regular Nightly profile as you choose.
Flags: needinfo?(bugmail) → needinfo?(ratm6)
OK so I made tests on this page : https://forums.mozfr.org/index.php For the first build, there is still latency, the actual nightly 51 is better. For the second build, it's a lot smoother, but it's very slow to reach the top or the bottom of the page while pressing the home and end keys.
Flags: needinfo?(ratm6) → needinfo?(bugmail)
(In reply to Julien L. from comment #24) > For the second build, it's a lot smoother, but it's very slow to reach the > top or the bottom of the page while pressing the home and end keys. This result makes sense... > For the first build, there is still latency, the actual nightly 51 is better. ... but this is unexpected to me. I'll have to think about it a bit more. Leaving needinfo on me for now.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #25) > > For the first build, there is still latency, the actual nightly 51 is better. > > ... but this is unexpected to me. I'll have to think about it a bit more. > Leaving needinfo on me for now. OK so I made again a few tests on forums.mozfr.org with the first build and in fact this is not a problem of latency but it s not as smooth as official nightly. This is a direct "jump" to the top or the bottom of the page. Even faster than when e10s is disabled. Could you make it a bit smoother? Or do you want a profile?
Flags: needinfo?(bugmail)
Flags: needinfo?(bugmail)
If you go to about:config, is the "general.smoothScroll" pref true or false? Does flipping that make a difference with the smoothness issue in the first build?
Flags: needinfo?(bugmail) → needinfo?(ratm6)
With this pref set to true (by default), it's just as I said before. With the pref set to false, there is no transition : i press End and I am at the bottom of the page directly! Furthermore the mouse wheel scrolling is jerky.
Flags: needinfo?(ratm6) → needinfo?(bugmail)
Ok, it's sounding to me like your machine is just painting that page slowly for some reason. That would explain all the behaviour seen so far. If the displayport area is large, there is more latency before the scroll. If the displayport area is small the main-thread smooth scroll animation isn't smooth because it skips frames. If APZ smooth scrolling is used then things are smooth although the physics is different. The profile from comment 19 shows long display list builds (~90+ ms) but the samples taken during that time show that the content thread is just sitting around in WaitForMessage (see [1] for example). BenWa, do you know why that time is shown as DisplayList? I've seen similar profiles in other bugs recently where it shows long display list builds but the samples are just waiting on the event queue. [1] https://cleopatra.io/#report=850e9c26fa089746489b3107130f6ba8e97a8844&filter=%5B%7B%22type%22%3A%22RangeSampleFilter%22,%22start%22%3A132480,%22end%22%3A134024%7D,%7B%22type%22%3A%22RangeSampleFilter%22,%22start%22%3A133526,%22end%22%3A133706%7D%5D&selection=0,103,104,105,106,2699,2700,2701,114,115,2702,2703,112,113,114,115,2702,116,366,117,189,367,190,368,369,370,371
Flags: needinfo?(bugmail) → needinfo?(bgirard)
The code to detected the displaylist section doesn't use explicit markers in the profile but tries to infer it poorly. Trust the samples which in this case are idle as you pointed out. FYI I never hooked up display port suppression to Home/End based scrolling.
Flags: needinfo?(bgirard)
Flags: needinfo?(bugmail)
(In reply to Julien L. from comment #26) > OK so I made again a few tests on forums.mozfr.org with the first build and > in fact this is not a problem of latency but it s not as smooth as official > nightly. This is a direct "jump" to the top or the bottom of the page. Even > faster than when e10s is disabled. Could you make it a bit smoother? Or do > you want a profile? Sorry to circle back here, but can you try that build again, but increase the values of the "general.smoothScroll.other.durationMaxMS" and "general.smoothScroll.other.durationMinMS" prefs to something larger? That should make the animation slower and smoother. It's surprising to me that it goes faster than when e10s is disabled, it should be the same speed. I think the patch that I used for that build is basically what I want to land, as it addresses the latency issue and is a pretty safe optimization. So if there are other unexpected side-effects from that patch then I want to dig into them.
Flags: needinfo?(bugmail) → needinfo?(ratm6)
I have set these two prefs to 200 but it seems that the mouse wheel scrolling is slower, right? And I have set then to default (150) then i have compared with e10s enabled/disabled again and I think there's no a big difference, I just must get into the habit... You could ask to someone else but I think your first build is a good fix for that bug :) Good job :)
Flags: needinfo?(ratm6) → needinfo?(bugmail)
Ok, thanks. I'll put up a patch.
Assignee: nobody → bugmail
Flags: needinfo?(bugmail)
Oh my god... I made another test on www.zdnet.fr (with e10s enabled then disabled) and I notice a latency with your first build when e10s is enabled (and apz) :( Do you think you can improve the first build?
Flags: needinfo?(bugmail)
That might be a different issue. In the profile I see ~17% of the time is in running scripts on the page which is a lot.
Flags: needinfo?(bugmail)
Comment on attachment 8789492 [details] Bug 1295019 - Suppress the APZ displayport while doing main-thread async scrolling. https://reviewboard.mozilla.org/r/77682/#review75982 Looks good, just watch out for unmatched supress/unspress as you already know.
Attachment #8789492 - Flags: review?(bgirard) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4edabcb9145b Suppress the APZ displayport while doing main-thread async scrolling. r=BenWa
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Flags: qe-verify+
On 51.0a1 Nightly 2016-08-14 build (when this bug was filed) I can see a scroll latency when scrolling with Home - End keys. However, using 48.0 RC build (the build against this bug was filed), I have instant scroll with or without e10s. Using Firefox 51 beta 9 with e10s on by default, I can see a scroll latency. Home - End key scrolling in this case looks like on older builds (eg 43.0.1 where e10s and apz were disabled). I performed the tests under Win 10 64-bit. Julien, how does Firefox 51 beta 9 build [1] look for you? Thank you! [1] https://archive.mozilla.org/pub/firefox/candidates/51.0b9-candidates/build1/win64/en-US/
Flags: needinfo?(ratm6)
To me, this build works well for this URL : https://forums.mozfr.org/viewforum.php?f=13 The scrolling with the Home and End keys is good. And I even made a try with the latest nighlty build, and the Home-End scrolling works good on http://www.zdnet.fr Sorry but I don't see any issue now...
Flags: needinfo?(ratm6)
By the way, I'm using Windows 8.1 64 bit
Thanks! Scrolling with Home-End keys looks the same for me too in Firefox 51 beta 9 versus Nightly 53.0a1. Marking as verified based on this and the above comments.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1365876
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: