Closed
Bug 1339160
Opened 9 years ago
Closed 9 years ago
Extract libraries on Gecko thread
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(firefox54 fixed)
RESOLVED
FIXED
Firefox 54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: jchen, Assigned: jchen)
Details
Attachments
(4 files)
|
19.57 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
|
4.72 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
|
3.54 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
|
5.71 KB,
patch
|
esawin
:
review+
|
Details | Diff | Splinter Review |
Extract libraries to cache on Gecko thread to avoid blocking the UI thread, and as a way to preload the libraries.
| Assignee | ||
Comment 1•9 years ago
|
||
When GeckoThread is launched without being initialized, it will load all
Gecko libs and then wait until it is initialized, before calling the
Gecko entry point. This allows us to preload Gecko libs without actually
running Gecko.
Attachment #8836820 -
Flags: review?(snorp)
| Assignee | ||
Comment 2•9 years ago
|
||
Add two actions to GeckoService to load libs only, and to load libs plus
Gecko, respectively.
Attachment #8836821 -
Flags: review?(snorp)
| Assignee | ||
Comment 3•9 years ago
|
||
Use the GeckoService load-gecko action to warm up Gecko instead of using
a separate method.
Attachment #8836823 -
Flags: review?(snorp)
| Assignee | ||
Comment 4•9 years ago
|
||
Use the GeckoService load-libs action to load and extract new libraries
when we receive the update broadcast. This makes us not block the UI
thread to extract libs, and lets Fennec run normally if the user
launches Fennec right after updating.
Attachment #8836824 -
Flags: review?(snorp)
| Assignee | ||
Updated•9 years ago
|
Attachment #8836823 -
Attachment description: 3. Use GeckoService to warm up Gecko from custom tabs service (v3) → 3. Use GeckoService to warm up Gecko from custom tabs service (v1)
Comment on attachment 8836820 [details] [diff] [review]
1. Allow GeckoThread to launch without being initialized (v1)
Review of attachment 8836820 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java
@@ +148,5 @@
> + setName("Gecko");
> + }
> +
> + private boolean isChildProcess() {
> + return mIPCFileDescriptor != -1;
There should probably be a better way of figuring this out...
Attachment #8836820 -
Flags: review?(snorp) → review+
Comment on attachment 8836823 [details] [diff] [review]
3. Use GeckoService to warm up Gecko from custom tabs service (v1)
Review of attachment 8836823 [details] [diff] [review]:
-----------------------------------------------------------------
This is a perf regression, because right now we fully start Gecko. I think we want to continue doing that, because the warmup() call is saying "we're very likely to open a custom tab soon".
Attachment #8836823 -
Flags: review?(snorp) → review-
Comment on attachment 8836824 [details] [diff] [review]
4. Use GeckoService to extract libs on update (v1)
Review of attachment 8836824 [details] [diff] [review]:
-----------------------------------------------------------------
I think blocking the UI thread was done on purpose. How can the user launch fennec "normally" if the libs haven't been extracted yet? Eugen should probably review this anyway.
Attachment #8836824 -
Flags: review?(snorp) → review?(esawin)
Comment on attachment 8836821 [details] [diff] [review]
2. Add GeckoService actions for loading libs and Gecko (v1)
Review of attachment 8836821 [details] [diff] [review]:
-----------------------------------------------------------------
This is fine, but not sure we need it since I don't really agree with the things that need it.
Attachment #8836821 -
Flags: review?(snorp) → review+
| Assignee | ||
Comment 9•9 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #6)
> Comment on attachment 8836823 [details] [diff] [review]
> 3. Use GeckoService to warm up Gecko from custom tabs service (v1)
>
> Review of attachment 8836823 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This is a perf regression, because right now we fully start Gecko. I think
> we want to continue doing that, because the warmup() call is saying "we're
> very likely to open a custom tab soon".
The new patch also fully starts Gecko, just using existing GeckoService code instead of some code that's specific to custom tabs.
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #7)
> Comment on attachment 8836824 [details] [diff] [review]
> 4. Use GeckoService to extract libs on update (v1)
>
> Review of attachment 8836824 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I think blocking the UI thread was done on purpose. How can the user launch
> fennec "normally" if the libs haven't been extracted yet? Eugen should
> probably review this anyway.
We don't need extracted libs to show the UI. Blocking the UI thread makes you unable to launch Fennec at all right after an update, whereas when you extract libs on the Gecko thread, you can still launch Fennec and have the UI display immediately, while the libs extract/load in the background, just like what happens in a "normal" Fennec launch.
(In reply to Jim Chen [:jchen] [:darchons] from comment #9)
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #6)
> > Comment on attachment 8836823 [details] [diff] [review]
> > 3. Use GeckoService to warm up Gecko from custom tabs service (v1)
> >
> > Review of attachment 8836823 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > This is a perf regression, because right now we fully start Gecko. I think
> > we want to continue doing that, because the warmup() call is saying "we're
> > very likely to open a custom tab soon".
>
> The new patch also fully starts Gecko, just using existing GeckoService code
> instead of some code that's specific to custom tabs.
Ah, I see. I thought that was the new libs-only action. Maybe rename this one to getIntentToStartGecko() since that's what we're really doing.
>
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #7)
> > Comment on attachment 8836824 [details] [diff] [review]
> > 4. Use GeckoService to extract libs on update (v1)
> >
> > Review of attachment 8836824 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > I think blocking the UI thread was done on purpose. How can the user launch
> > fennec "normally" if the libs haven't been extracted yet? Eugen should
> > probably review this anyway.
>
> We don't need extracted libs to show the UI. Blocking the UI thread makes
> you unable to launch Fennec at all right after an update, whereas when you
> extract libs on the Gecko thread, you can still launch Fennec and have the
> UI display immediately, while the libs extract/load in the background, just
> like what happens in a "normal" Fennec launch.
Alright, that makes sense.
Attachment #8836823 -
Flags: review- → review+
Comment 11•9 years ago
|
||
Comment on attachment 8836824 [details] [diff] [review]
4. Use GeckoService to extract libs on update (v1)
Review of attachment 8836824 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/java/org/mozilla/gecko/PackageReplacedReceiver.java
@@ +25,5 @@
> return;
> }
>
> + // Load new Gecko libs to extracted them to cache.
> + context.startService(GeckoService.getIntentToLoadLibs(context));
extract
Attachment #8836824 -
Flags: review?(esawin) → review+
Comment 12•9 years ago
|
||
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c80d17b6ea48
1. Allow GeckoThread to launch without being initialized; r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/26359cfd0d24
2. Add GeckoService actions for loading libs and starting Gecko; r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/8620e18b5878
3. Use GeckoService to warm up Gecko from custom tabs service; r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/427fd5767291
4. Use GeckoService to extract libs on update; r=esawin
Comment 13•9 years ago
|
||
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0cdc48673b0c
5. Follow-up to fix errors; r=me
Comment 14•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c80d17b6ea48
https://hg.mozilla.org/mozilla-central/rev/26359cfd0d24
https://hg.mozilla.org/mozilla-central/rev/8620e18b5878
https://hg.mozilla.org/mozilla-central/rev/427fd5767291
https://hg.mozilla.org/mozilla-central/rev/0cdc48673b0c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•