Open Bug 1809944 Opened 1 year ago Updated 9 months ago

Major page initial load slowdowns on multiple devices without addons, except in private browsing

Categories

(Fenix :: Performance, defect, P2)

All
Android

Tracking

(Performance Impact:medium, firefox108 affected)

Performance Impact medium
Tracking Status
firefox108 --- affected

People

(Reporter: cpeterson, Assigned: mleclair)

Details

(Keywords: perf:pageload, perf:responsiveness, Whiteboard: [geckoview:m111])

From github: https://github.com/mozilla-mobile/fenix/issues/28437.

If I enter almost any site like "reddit.com" in the URL bar of a new or existing tab, it usually takes at least 4 seconds before the tab updates from what it previously was showing to start showing any content being loaded. If I do it in a private browsing tab (or Google Chrome), then things visibly start loading very quickly well under half a second (and the whole page loads within a second). This kind of issue affects many sites I browse often every day that I use Firefox Android. I've decided to try to document the issue and investigate it finally.

This issue also often affects new page loads when I follow a link or otherwise enter a new page. I just went to google.com, searched a word, pressed enter, and the progress bar sat at the 1/4 mark still showing the tab content for minutes. Google itself loaded quickly, and I saw suggestions appear about immediately as I typed a word to search, but it wasn't until I hit the search button and triggered a new page being loaded that any kind of slowdown happened. If I go to chat.openai.com, the site often redirects me to a Cloudflare "checking if the site connection is secure" interstitial page, which doesn't always finish loading in a reasonable time, and it doesn't let me through until after a few refresh attempts. Then I click the login page, it immediately brings me to a "auth0.openai.com" page, and I click "Continue with Google". Loading this page often causes the slow page loading behavior for 10+ seconds or fails to load.

This issue doesn't happen for me on desktop Firefox, in non-Firefox Android browsers or apps, or in Firefox private browsing mode. There seem to be no signs that it's just a symptom of a flakey internet connection instead of an issue with Firefox Android. Whenever I've switched to a new phone, Firefox Android seemed normal and without this issue until after I logged into Firefox sync. I think the issue only started at some point in the last few years and that there was a time that Firefox Android worked on my profile without issue.

I'm not using any addons in Firefox Android. I've had this issue for years across multiple Android devices. I am using Firefox sync on my phone and desktop. I've been using Firefox since before Firefox sync and have 8450 bookmarks. I assume the performance issues are related to this or another aspect of my profile because it's probably the main way I differ from most users, and it's the thing in common between the devices I've had this issue on.

I've used the "Delete browsing data" button to delete "Browsing history and site data", "Cookies", "Cached images and files", and "Site permissions" but it hasn't affected the issue. I thought maybe there's slow code in Firefox checking if the page I'm accessing was previously visited in my history, but it doesn't seem to be that.

Theories

It seems like this issue especially affects loads of web pages that ... load scripts from multiple domains? Simple sites that don't pull in any 3rd party or ad scripts like https://news.ycombinator.com/ load instantly regularly without running into this issue, but heavy Google pages or news sites often have the issue. It might be that the more domains that are involved with loading a site, the higher chance of the load slowdown issue happening. (Totally shooting in the dark: could there be a code path, that's not hit in private browsing mode, comparing each of the domains being connected to against my each of my bookmarks, and depending on the state of some cache have a O(n^2) kind of worst-case runtime?)

I have recorded a profile of this issue happening while trying to load reddit in a new tab: https://share.firefox.dev/3Iu4X12

Device information

  • Android device: Android 13, Pixel 7, also Pixel 5
  • Fenix version: 108.1.1

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

Severity: -- → S3
Keywords: perf:pageload
Whiteboard: [geckoview:m111?]
Performance Impact: --- → ?
Rank: 111
Assignee: nobody → mleclair

Setting priority P1 because Marc assigned this bug to himself. I assume he's now investigating the issue.

Priority: -- → P1
Whiteboard: [geckoview:m111?] → [geckoview:m111]
Performance Impact: ? → medium

Marc, are you investigating this performance bug? What's the right team for this bug?

Flags: needinfo?(mleclair)
Priority: P1 → P2

I did look at it and was able to reproduce. I'll send this in the perf queue to be triaged more appropriately that seems like it was already done. I'll check up with it then (and i'll reassign myself)

Flags: needinfo?(mleclair)
Performance Impact: medium → ?
Performance Impact: ? → medium
You need to log in before you can comment on or make changes to this bug.