Send custom "marionette-startup-requested" observer notification to start Marionette in Fennec
Categories
(Firefox for Android Graveyard :: General, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
As of now Marionette listens for a couple of startup observer notifications, and has to wait until the startup recorder has finished recording startup scripts:
James or Nick, where would be the best place to send this notification?
So you want to know when geckoview is finished starting, right? I think "browser-delayed-startup-finished"[1] is probably fine.
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)
No, this is for Fennec and not Geckoview.
Ah, ok. Well Fennec does the same thing. https://searchfox.org/mozilla-central/rev/8ff2cd0a27e3764d9540abdc5a66b2fb1e4e9644/mobile/android/chrome/content/browser.js#523
Reporter | ||
Comment 4•6 years ago
|
||
Ok, just to wrap up the question you asked in comment 1 which I missed to reply. We don't want to listen for a specific observer notification but we want to let application send a specific notification for Marionette. As the topic of the bug mentions it will be "marionette-startup-requested".
In case of Firefox we delay that to after all the startup scripts have been loaded. The code you referenced in the last comment shows some more scripts to be run via initLater()
. Would it hurt the startup time when we send the notification too early? Should we maybe move it to after browser-idle-startup-tasks-finished
?
Also for GeckoView we do it here, and I wonder if that may also be too early:
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #4)
Ok, just to wrap up the question you asked in comment 1 which I missed to reply. We don't want to listen for a specific observer notification but we want to let application send a specific notification for Marionette. As the topic of the bug mentions it will be "marionette-startup-requested".
Ah, ok, I'm following now.
In case of Firefox we delay that to after all the startup scripts have been loaded. The code you referenced in the last comment shows some more scripts to be run via
initLater()
. Would it hurt the startup time when we send the notification too early? Should we maybe move it to afterbrowser-idle-startup-tasks-finished
?
It depends on where we're measuring, but yeah, it could potentially hurt startup perf. AFAIK we usually cut off "startup" for Fennec/GV to be "chrome document loaded", which would happen before this.
Also for GeckoView we do it here, and I wonder if that may also be too early:
That's also probably fine since it's deferred to a future iteration, but it may also be worthwhile it to use the InitLater
stuff there.
Reporter | ||
Comment 6•6 years ago
|
||
Thank you for the information James! I had a try to get this implemented for Fennec and noticed that right now we also depend on the sessionstore-windows-restored
notification, and would try to initialize Marionette twice.
To not have a temporary workaround just for Fennec it would be good to get Firefox, Fennec, and maybe GeckoView patched in the same patch series. That said I will do it on bug 1530979.
Assignee | ||
Updated•4 years ago
|
Description
•