mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.48k stars 1.27k forks source link

[Performance] The time from entering a url/opening a bookmark till fully loaded is high #12664

Closed ghost closed 4 years ago

ghost commented 4 years ago

Steps to reproduce

Open any url/bookmark. The page loads very slow. My internet is fine. I can open the same urls in chrome instantly. However, very slow in Fenix (sometimes it works fine but it is rare).

I recorded a profile using the default Web Developer settings in about:debugging. https://share.firefox.dev/2WtAyqW Another profile with firefox platform settings - https://share.firefox.dev/2Cjijxe Another profile using some custom settings - https://share.firefox.dev/3eA2tvj Please tell if I need to profile differently or provide some other information.

Device information

┆Issue is synchronized with this Jira Task

ghost commented 4 years ago

A screen recording -

20200717191605.zip

Furax-31 commented 4 years ago

I have the same problem. Firefox is very very slow (all versions : stable, beta, nightly). While the loading is instantly on Vivaldi (for example). EDIT : Android 9

eliserichards commented 4 years ago

Thank you for the profiles @sheepycoder! That's very helpful! Do you know if they are from the latest Nightly?

ghost commented 4 years ago

@eliserichards Yes, the profiles are recorded using the latest nightly.

ghost commented 4 years ago

Did anybody look at the profiles? Are they enough to find the issue, or more profiles or some more detail required?

mcomella commented 4 years ago

Triage: we didn't see any java main thread issues in the profiles so we'll need someone from the platform side to take a look.

@acreskeyMoz Would you mind taking a look at the profiles to understand the source of the problems, or finding someone who could?

acreskeyMoz commented 4 years ago

The biggest problems in the first profile (https://triplebyte.com) are the Dark Reader extension.

Almost 10 seconds of JS in the content process via this extension: https://share.firefox.dev/3hvrv0G

And contributing to over a second of delay early on in the parent process: https://share.firefox.dev/30EfajL

In the second profile (reddit.com) I'm also seeing huge delays in the parent process and the content process caused by the Dark Reader extension.

@sheepycoder -- thank you for collecting the profiles. I can see that the Dark Reader extension is very problematic and I'll see what we can do about that.

In the meantime, can you please try Fenix with no additional extensions?

acreskeyMoz commented 4 years ago

Running on the Moto G5 with the July 21 nightly Fenix: https://triplebyte.com/interview_guide

With Dark Reader (we see Dark Reader busy in the content process during load (although nowhere near as bad as in the original shared profile) https://share.firefox.dev/2EdEfuu

Without: https://share.firefox.dev/2ONz7iL

The pageload is significantly faster (although still not great).

ghost commented 4 years ago

The pageload is significantly faster (although still not great)

Confirmed on my phone that disabling dark reader improves the page loading times a lot, though it is still not great.

acreskeyMoz commented 4 years ago

I've reached out to the addon developer to see what can be done to mitigate the impact of this popular addon during pageload.

Because that's by far the primary source of the performance problem in the bug I propose we close it and open others for particular sites if they are found. In general, improving the pageload performance of Fenix is an ongoing priority.

ghost commented 4 years ago

Okay, closing this issue.

mcomella commented 4 years ago

@acreskeyMoz Should we keep this issue open to track reaching out to the developer or is it okay to remain closed?

acreskeyMoz commented 4 years ago

@mcomella I'd rather not keep it open in its current form (pageload in general being so poor). We could create a new bug (or rename it) to be a DarkReader bug -- but then should it be logged against Fenix?

I had added an item to the "Android FE bi-weekly Sync up" to discuss addon performance -- maybe we can come up with best practices then?

andreicristianpetcu commented 4 years ago

Please post here the DR perf bug here so we can track it.

acreskeyMoz commented 4 years ago

FYI - I've heard back from the DarkReader developer that the Static mode is being improved for lower-end devices, and there are plans to add a caching mechanism.