fenix icon indicating copy to clipboard operation
fenix copied to clipboard

Long pause until page finishes loading when clicking a Google search result (GeckoLoginDelegateWrapper.onLoginFetch?)

Open mcomella opened this issue 6 years ago • 11 comments

STR from Vesta (I have no seen this locally):

  • Open Firefox
  • Click the url bar
  • Type in a query, hit enter
  • Google search doesn’t take that long
  • Tap on a result
  • The page takes 50-60 seconds to load. For the first 10 seconds you still see the search results screen, and for the next 40-50 seconds you see a blank page, and the destination page appears all at once (if the user hasn’t given up at this point aready). See screenshot below for page user is stuck on:

Screenshot_20200121-031505

Device: Pixel 3 Release channel: Nightly, updated every night Usually on wifi

┆Issue is synchronized with this Jira Task

mcomella avatar Jan 23 '20 22:01 mcomella

This may be investigated in https://bugzilla.mozilla.org/show_bug.cgi?id=1613473

mcomella avatar Feb 17 '20 16:02 mcomella

This may be investigated in https://bugzilla.mozilla.org/show_bug.cgi?id=1613473

This issue was closed.

@vesta0 Are you still able to reproduce this issue on the latest Nightlies?

mcomella avatar Feb 20 '20 22:02 mcomella

This may be investigated in https://bugzilla.mozilla.org/show_bug.cgi?id=1613473

This issue was closed.

Though it was closed due to an issue that seems unrelated to this STR: https://bugzilla.mozilla.org/show_bug.cgi?id=1613473#c11

@ecsmyth Do we have telemetry on page load duration? I wonder if we could see this happening in the wild.

mcomella avatar Feb 24 '20 20:02 mcomella

Agi is also able to reproduce this and pulled a profile: https://perfht.ml/32odSK9 Collectively, they've reproduced on P2, P3, S10e, S9. From the profile, we've found:

  • GeckoLoginDelegateWrapper.onLoginFetch blocks the main thread for 7-8s. mattwoodrow guesses there's sampling error (because there are no main thread samples) and the delegate is taking even longer than that
  • 2s waiting for the socket thread, which is related to uBlock origin. "For the uBlock bits, it's hard to be entirely sure, but it looks like the load request gets to the parent, and we hold it while we let extensions inspect/modify it, and that initializes uBlocks, which takes 2 seconds Not obvious that we can do much about that", "Seems like that would impact fennec as well.", "I would assume so! Doesn't look like it would be affected by e10s at all"

The reason I've been unable to reproduce is probably because I don't have sync enabled and don't store any logins.

@ecsmyth Any thoughts on priority given this may only affect users with logins? Seems extremely high impact for an unknown (to me) portion of the userbase so I'd lean P1 responsiveness issue.

Note: there's an issue open to measure the performance of this code https://github.com/mozilla-mobile/android-components/issues/5531

mcomella avatar Feb 25 '20 00:02 mcomella

GeckoLoginDelegateWrapper.onLoginFetch blocks the main thread for 7-8s.

@ekager Any thoughts on a solution to this? Is it possible to make onLoginFetch occur asynchronously?

mcomella avatar Feb 25 '20 00:02 mcomella

@mcomella just worked with @Baron-Severin to make this PR in AC and hopefully this should improve the performance here https://github.com/mozilla-mobile/android-components/pull/6059

ekager avatar Feb 25 '20 03:02 ekager

I split out an issue for creating a dashboard to visualize page load telemetry.

Given @ekager's fix, I'm going to keep this assigned to me and review once the fix hits Nightly.

ecsmyth avatar Feb 26 '20 19:02 ecsmyth

Agi can no longer reproduce but will update us if that changes.

mcomella avatar Feb 27 '20 19:02 mcomella

mozilla-mobile/android-components#6059 has landed and is in Nightly @ecsmyth

ekager avatar Feb 28 '20 06:02 ekager

This is ready to retest @ecsmyth !

ekager avatar Mar 03 '20 18:03 ekager

Confirmed that I can no longer reproduce on general search results or search results leading to login pages.

ecsmyth avatar Mar 04 '20 20:03 ecsmyth