GeckoView startup optimizations

RESOLVED FIXED in Firefox 57

Status

enhancement
RESOLVED FIXED
2 years ago
6 months ago

People

(Reporter: jchen, Assigned: jchen)

Tracking

Trunk
mozilla57
All
Android
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(6 attachments)

Small optimizations for GeckoView startup
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 6

2 years ago
mozreview-review
Comment on attachment 8903353 [details]
Bug 1394580 - 1. Only load AsyncPrefs for Fennec;

https://reviewboard.mozilla.org/r/175150/#review180386
Attachment #8903353 - Flags: review?(esawin) → review+

Comment 7

2 years ago
mozreview-review
Comment on attachment 8903357 [details]
Bug 1394580 - 5. Lazy-load Task.jsm in Messaging.jsm;

https://reviewboard.mozilla.org/r/175158/#review180394
Attachment #8903357 - Flags: review?(esawin) → review+
Comment on attachment 8903354 [details]
Bug 1394580 - 2. Add GeckoViewStartup to consolidate startup tasks;

https://reviewboard.mozilla.org/r/175152/#review180488

::: mobile/android/components/geckoview/GeckoViewStartup.js:71
(Diff revision 1)
> +      (ppmm || mm).forEach(msg => target.addMessageListener(msg, listener));
> +    }
> +  },
> +
> +  addLazyEventListener: function(aOptions) {
> +    let {name, target, events, options} = aOptions;

You can just do:

addLazyEventListener({ name, target, events, options}) {

}
Attachment #8903354 - Flags: review?(snorp) → review+
Comment on attachment 8903356 [details]
Bug 1394580 - 4. Disable MDNS service for GeckoView;

https://reviewboard.mozilla.org/r/175156/#review180490

I think we want to support casting and presentation API, so I think we need to keep this. We're not using the JS implementation, right? How much time does it need on startup?

Comment 10

2 years ago
mozreview-review
Comment on attachment 8903355 [details]
Bug 1394580 - 3. Lazy-load AndroidLog.jsm;

https://reviewboard.mozilla.org/r/175154/#review180508

LGTM
Attachment #8903355 - Flags: review?(droeh) → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #9)
> Comment on attachment 8903356 [details]
> Bug 1394580 - 4. Disable MDNS service for GeckoView;
> 
> https://reviewboard.mozilla.org/r/175156/#review180490
> 
> I think we want to support casting and presentation API, so I think we need
> to keep this. We're not using the JS implementation, right? How much time
> does it need on startup?

I guess I see those more as browser features. Seems like the fallback MDNS code is not loaded. Still it does take around 30ms on startup on a Nexus 4.
(In reply to Jim Chen [:jchen] [:darchons] from comment #11)
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #9)
> > Comment on attachment 8903356 [details]
> > Bug 1394580 - 4. Disable MDNS service for GeckoView;
> > 
> > https://reviewboard.mozilla.org/r/175156/#review180490
> > 
> > I think we want to support casting and presentation API, so I think we need
> > to keep this. We're not using the JS implementation, right? How much time
> > does it need on startup?
> 
> I guess I see those more as browser features. Seems like the fallback MDNS
> code is not loaded. Still it does take around 30ms on startup on a Nexus 4.

It's a bit of both, right? A browser probably can't cast a web video without some help from the engine. I guess maybe we can disable it for now and come at it again when we decide we want that.
Comment on attachment 8903356 [details]
Bug 1394580 - 4. Disable MDNS service for GeckoView;

https://reviewboard.mozilla.org/r/175156/#review180624
Attachment #8903356 - Flags: review?(snorp) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Assignee

Comment 20

2 years ago
mozreview-review
Comment on attachment 8904683 [details]
Bug 1394580 - 6. Use WindowEventDispatcher for prompt if available;

https://reviewboard.mozilla.org/r/176484/#review181460
Attachment #8904683 - Flags: review+

Comment 21

2 years ago
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b84fc40ed8c2
1. Only load AsyncPrefs for Fennec; r=esawin
https://hg.mozilla.org/integration/autoland/rev/6c4c8b4e38cf
2. Add GeckoViewStartup to consolidate startup tasks; r=snorp
https://hg.mozilla.org/integration/autoland/rev/995d9ef9af5f
3. Lazy-load AndroidLog.jsm; r=droeh
https://hg.mozilla.org/integration/autoland/rev/a9b1cbbeea9a
4. Disable MDNS service for GeckoView; r=snorp
https://hg.mozilla.org/integration/autoland/rev/1cc1955d6af3
5. Lazy-load Task.jsm in Messaging.jsm; r=esawin
https://hg.mozilla.org/integration/autoland/rev/f069f3c69597
6. Use WindowEventDispatcher for prompt if available; r=jchen
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 29

2 years ago
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/71322aab413b
1. Only load AsyncPrefs for Fennec; r=esawin
https://hg.mozilla.org/integration/autoland/rev/0fd2ec57de05
2. Add GeckoViewStartup to consolidate startup tasks; r=snorp
https://hg.mozilla.org/integration/autoland/rev/aeb4ccaf74b3
3. Lazy-load AndroidLog.jsm; r=droeh
https://hg.mozilla.org/integration/autoland/rev/dd645a7a4f81
4. Disable MDNS service for GeckoView; r=snorp
https://hg.mozilla.org/integration/autoland/rev/b3b76444d58d
5. Lazy-load Task.jsm in Messaging.jsm; r=esawin
https://hg.mozilla.org/integration/autoland/rev/be2d41805031
6. Use WindowEventDispatcher for prompt if available; r=jchen
Flags: needinfo?(nchen)

Comment 31

2 years ago
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef59984ad7b0
7. Follow-up to unpack fields in function signature; r=me

Updated

6 months ago
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 57 → mozilla57
You need to log in before you can comment on or make changes to this bug.