Closed Bug 1529333 Opened 5 years ago Closed 3 years ago

Re-evaluate which resources we auto-download on GeckoView first run and when

Categories

(GeckoView :: General, enhancement, P2)

All
Android
enhancement

Tracking

(Performance Impact:high)

RESOLVED WORKSFORME
Performance Impact high

People

(Reporter: cpeterson, Unassigned)

References

Details

(Keywords: perf:pageload)

We download a bunch of resources on first run, which might cause a bad user experience for new users evaluating Fenix.

Some stuff we download on first run:

  • Safe Browsing lists
    • Agi says Chrome delays initial download of the Safe Browsing list so its first few page loads don't have Safe Browsing protection. We might not be able to do that for Gecko because we use the same Shavar download mechanism for Tracking Protection.
  • Tracking Protection lists
  • Other Kinto lists?
  • OpenH264 codec
    • only used for WebRTC, which is not a common mobile use case.
    • James suggests we disable download entirely so WebRTC negotiate VP9, which is preferred anyways.

NSS cert db initialization in a new profile can slow early page loads: bug 1529044

Depends on: 1529044

(In reply to Chris Peterson [:cpeterson] from comment #1)

NSS cert db initialization in a new profile can slow early page loads: bug 1529044

Hmm, my interpretation of that bug is actually slightly different: As long as we don't have a cert DB (which is the case for a new profile), NSS initialisation is fast, but once the profile has been used for a few minutes and we managed to create/populate/... the cert DB and NSS starts using it, NSS initialisation becomes slow and slows down early page loads.

Priority: -- → P2
Whiteboard: [geckoview:fenix:p2] → [geckoview:fenix:p2] [qf]
Whiteboard: [geckoview:fenix:p2] [qf] → [geckoview:fenix:p2] [qf:p1:pageload]

(In reply to Jan Henning [:JanH] from comment #2)

(In reply to Chris Peterson [:cpeterson] from comment #1)

NSS cert db initialization in a new profile can slow early page loads: bug 1529044

Hmm, my interpretation of that bug is actually slightly different: As long as we don't have a cert DB (which is the case for a new profile), NSS initialisation is fast, but once the profile has been used for a few minutes and we managed to create/populate/... the cert DB and NSS starts using it, NSS initialisation becomes slow and slows down early page loads.

I've collected more data and run more tests for Bug 1529044

This is impacting new profiles as used in our Nimbledroid geckoview_example test scenario.
(Nimbledroid at the moment follows this protocol:


-clear all app data (including profile)
-launch app, wait for the about:blank page to load 
-navigate to https://www.google.com, wait for for page to load
-load the target url
```)

Here's some timing with and without no-cert DB.
https://paste.rs/JjG

It's not a resource download, but rather the opposite, but the TelemetryController submits its ping early on.
https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/app/TelemetryController.jsm#453

Profiling on the reference laptop shows that this can block the main thread for ~350ms. Haven't been able to profile this on android yet, but this will likely occur during the page loads that we see on Nimbledroid.

Bug 1543403 describes a 1 second stall from verifying Normandy recipes on startup.

Rank: 35
Whiteboard: [geckoview:fenix:p2] [qf:p1:pageload] → [qf:p1:pageload]

I retook some profiles for GV start up:
-The whole profile for an App link startup
-All the Java threads for GV start up
Not sure what to look for here though!

Telemetry request happens in parallel with the ui initialization and doesn't seem to block page load. Other requests look as expected.
Nothing related to kinto or codecs.
Closing as WFM, but please file a new bug if there are still issues.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Performance Impact: --- → P1
Keywords: perf:pageload
Whiteboard: [qf:p1:pageload]
You need to log in before you can comment on or make changes to this bug.