Closed
Bug 883121
Opened 12 years ago
Closed 9 years ago
Replace inefficient call to navigator.mozApps.mgmt.getAll(); on startup of a Webapp.
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jhugman, Unassigned)
Details
(Whiteboard: [WebRuntime])
Updated•12 years ago
|
Hardware: x86 → All
Comment 1•12 years ago
|
||
Is this really important? It's only triggered during the first startup. And probably the overhead is due to reading the registry file, that we should do anyway in order to get the application data (to "install" the permission).
Comment 2•12 years ago
|
||
Note that even if you wanted to use directly DOMApplicationRegister, when you import Webapps.jsm you automatically trigger loading the webapps registry file and all the manifest files.
Fabrice what do you think?
Flags: needinfo?(fabrice)
Comment 3•12 years ago
|
||
GetAll() does a bunch of object copying to create the application objects. So I still think it's better to only get to the manifest in a more direct way, especially on mobile.
Flags: needinfo?(fabrice)
Comment 4•12 years ago
|
||
Oh, actually the manifest files aren't read only during the first startup, but at every startup.
I think this is the main source of overhead, especially on mobile where file reading can be pretty slow.
Does DOMApplicationRegistry really need to read all the manifest files on startup? (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#234)
I think to install permissions and to create a <browser> with the correct principal on Android and Desktop we don't need to read all the manifests. We'd just need to read the registry and the manifest of the app we're running.
Updated•12 years ago
|
Summary: Replace inefficient call to navigator.mozApps.mgmt.getAll(); on first time run of a Webapp. → Replace inefficient call to navigator.mozApps.mgmt.getAll(); on startup of a Webapp.
Comment 5•12 years ago
|
||
Yes, we need to read all the manifest files at startup - at least on b2g - to register the system messages. It's not clear to me how these will be managed on desktop and android. Also, we are caching the manifests once they are read - this was a net gain on b2g because the homescreen is doing a getAll() anyway pretty early.
Comment 6•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #5)
> Yes, we need to read all the manifest files at startup - at least on b2g -
> to register the system messages. It's not clear to me how these will be
> managed on desktop and android. Also, we are caching the manifests once they
> are read - this was a net gain on b2g because the homescreen is doing a
> getAll() anyway pretty early.
Yep, I was wondering if this was necessary on Android and Desktop. I don't know what system messages are, but they sounded b2g-specific.
Comment 7•12 years ago
|
||
(In reply to Marco Castelluccio [:marco] from comment #6)
>
> Yep, I was wondering if this was necessary on Android and Desktop. I don't
> know what system messages are, but they sounded b2g-specific.
No they are not b2g-specific. Support is added for desktop because the push api relies on them for instance. Desktop and android need to catch up!
Comment 8•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #7)
> No they are not b2g-specific. Support is added for desktop because the push
> api relies on them for instance. Desktop and android need to catch up!
Thank you for the clarification!
Updated•11 years ago
|
Priority: -- → P3
Updated•11 years ago
|
Whiteboard: [WebRuntime]
Comment 9•9 years ago
|
||
Per bug 1235869, we're going to disable the Android web runtime, so we won't fix this bug in it.
(This is part of a bulk resolution of bugs in the Firefox for Android::Web Apps component, from which I attempted to exclude bugs that are not specific to the runtime, but it's possible that I included one accidentally. If so, I'm sorry, and please reopen the bug!)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•4 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
•