I am working on developing a packaged app to Firefox OS that takes very long time to install from the browser App Manager. A typical installation log says 19:31:04: connecting to localhost:55735 19:31:06: connected 19:31:56: Installing the MyApp app... 19:36:52: Install completed. The size of the application is 78MB of Emscripten-built code. This corresponds to an average data rate of 266KB/sec, which is about 0.4% of a 60MB/sec USB2 bus. Naturally the installation is not only about uploading data, but 5 minutes to install feels very long. While the installation is in process, there is no notification in the UI (except for the "Installing..." log message) telling about the progress, and the different buttons do not do anything while the installation is in progress. There is no Cancel button or a progress meter, so for a good while I thought the whole App Manager install process was not working at all, and that the process had hung. I can provide a zip of a build to reproduce, but cannot link it here since it is non-public Mozilla partner code.
The application was recently updated with new assets, which increased the application size to 134.2MB. After that, installation now logs 15:06:29: Installing the MyApp app... 15:15:51: Install completed. or 9minutes and 22 seconds. This gives an average data rate that is about the same as before - 244.52 KB/sec. So it looks like the data size is the dominating factor in slow uploads. Increasing the data size from 78MB to 134.2MB increased the upload time from 4minutes 56 seconds to 9 minutes and 22 seconds, so that delta suggests a linear 216.35 KB/sec upload rate. Any idea if this could be optimized?
How long does it take if you install it from an http server and not through the app manager?
I tried to create a http-hosted version of the app, but failed due to issue https://bugzilla.mozilla.org/show_bug.cgi?id=948905 . The download step itself took less than two minutes during that attempt though.
I now got a Nexus 4 device to which I built my own FFOS with the configuration "BRANCH=v1.2 ./config.sh nexus-4". On that device, installing a packaged app that is 102.8MB in size took 4 minutes 3 seconds, giving a data rate of 433.2KB/sec or ~0.7% of a USB2 bus.
:fabrice, do you think the culprit here is in the app manager or the webapp actor?
The original code I wrote to upload packages was very unoptimized, since it didn't try to chunk the files to send. So I can see how this would be inefficient to load the 100MB file in memory before pushing it to the device. We should get performance comparable to a simple |adb push|.
Yes, we're aware it's quite slow right now. :( But, I am actively working on this problem, and patches are up for review to fix the core problem. We'll eventually have speeds slightly faster than |adb push|.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 924574
Component: General → Developer Tools: App Manager
Product: Firefox OS → Firefox
You need to log in before you can comment on or make changes to this bug.