Closed Bug 1531455 Opened 5 years ago Closed 4 years ago

Limit the number of chrome Custom Elements that get loaded for GeckoView

Categories

(GeckoView :: General, enhancement, P3)

Unspecified
Android
enhancement

Tracking

(Performance Impact:high, firefox65 wontfix, firefox66 wontfix, firefox67 wontfix, firefox75 fixed)

RESOLVED FIXED
mozilla75
Performance Impact high
Tracking Status
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox75 --- fixed

People

(Reporter: bgrins, Assigned: bdahl)

References

(Blocks 2 open bugs)

Details

(Keywords: perf:pageload, Whiteboard: [geckoview][geckoview:m75])

Attachments

(1 file)

As I understand it:

  1. GeckoView creates a xul browser at https://searchfox.org/mozilla-central/rev/00f3836a87b844b5e4bc82f698c559b9966e4be2/mobile/android/chrome/geckoview/geckoview.js#376 via the script loaded in https://searchfox.org/mozilla-central/source/mobile/android/chrome/geckoview/geckoview.xul.
  2. Because of (1), we must running the same MainProcessSingleton which loads Custom Elements via https://searchfox.org/mozilla-central/rev/00f3836a87b844b5e4bc82f698c559b9966e4be2/toolkit/components/processsingleton/MainProcessSingleton.jsm#58, since that's how the <xul:browser> Custom Element gets loaded.
  3. There's no other chrome UI that requires Custom Elements in GeckoView.

I think we could expand the condition with which we skip loading non-browser Custom Elements to include geckoview.xul at https://searchfox.org/mozilla-central/rev/00f3836a87b844b5e4bc82f698c559b9966e4be2/toolkit/content/customElements.js#499. This would avoid loading and executing a bunch of JS for Custom Elements that are never used.

sounds like this change could improve GeckoView startup time.

OS: All → Android
Priority: -- → P2
Whiteboard: [geckoview:fenix:p3][qf]
Whiteboard: [geckoview:fenix:p3][qf] → [geckoview:fenix:p3][qf:p1]

:sefeng, did you file this under qf:p1 during your triage? Would you agree this is a qf:responsiveness bug, which would mean this probably would be a p3?

Flags: needinfo?(sefeng)

brennie: Yeah, I think I marked this qf:p1 during triage and I can't recall exactly how we made the decision. However, based on cpeterson's comment, it seems like the GeckoView startup time could be improved by limiting the number of Custom Elements, so I am not sure if responsiveness is the correct category for it.

Flags: needinfo?(sefeng)
Whiteboard: [geckoview:fenix:p3][qf:p1] → [geckoview:fenix:p3][qf:p1:pageload]

I'm editing a bunch of GeckoView bugs. If you'd like to filter all this bugmail, search and destroy emails containing this UUID:

e88a5094-0fc0-4b7c-b7c5-aef00a11dbc9

Priority: P2 → P3

This is marked as qf:p1. Chris, could you needinfo someone from GeckoView team to take a look at this?

Flags: needinfo?(cpeterson)

(In reply to Olli Pettay [:smaug] from comment #5)

This is marked as qf:p1. Chris, could you needinfo someone from GeckoView team to take a look at this?

I'm no longer the EPM for GeckoView. Forwarding needinfo request to Emily Toop, GeckoView engineering manager. Also, flagging this bug (with whiteboard tag [geckoview]) so it shows up in the GeckoView triage meeting.

Flags: needinfo?(cpeterson) → needinfo?(etoop)
Whiteboard: [geckoview:fenix:p3][qf:p1:pageload] → [qf:p1:pageload] [geckoview]
Assignee: nobody → bdahl

GeckoView only needs the browser element, skip loading the rest.

Did a quick test of creating 5 new tabs, timing from action_new_tab to DOMContentLoaded on a Moto G. Looks like it shaves off ~100ms.

Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ce08dcd4388f
Don't load extra custom elements in GeckoView. r=bgrins

(In reply to Brendan Dahl [:bdahl] from comment #8)

Did a quick test of creating 5 new tabs, timing from action_new_tab to DOMContentLoaded on a Moto G. Looks like it shaves off ~100ms.

My guess is that this is pure hotness for Bug 1608826. Thanks, bdahl!

Blocks: 1608826
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Flags: needinfo?(etoop)
Whiteboard: [qf:p1:pageload] [geckoview] → [qf:p1:pageload] [geckoview][geckoview:m75]
Blocks: 1613227
Performance Impact: --- → P1
Keywords: perf:pageload
Whiteboard: [qf:p1:pageload] [geckoview][geckoview:m75] → [geckoview][geckoview:m75]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: