Closed
Bug 908220
Opened 12 years ago
Closed 12 years ago
Preload IndexedDB for preloaded apps
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: timdream, Unassigned)
Details
The Traditional Chinese IME rely on IndexedDB to offload the memory. It currently runs by populating 5.9MB of JSON into IndexedDB in chunks, resulting an 18MB sqlite file. You can run the web demo here:
http://timdream.org/jszhuyin/
If the Keyboard app is loaded with this IME, such first time operation is unacceptable for our low cost phones, because the disk write is slow and the entire phone will be show because of it.
It would be nice if we could preload the sqlite file* in system partition and have it copied to data partition in bunk when the phone first runs, just like removable preload apps.
* This sqlite file will be commit into Gaia coz Gaia build script coz are not suppose to generate anything Gecko-specific. bug 905096 is working on converting Gaia build script to Javascript and runnable on both node and xpcshell.
| Reporter | ||
Updated•12 years ago
|
Flags: needinfo?(fabrice)
Comment 1•12 years ago
|
||
In general we really want to not do that. That will need some code in gecko to move around files that are specific to a gaia app, which we absolutely want to avoid.
How slow is this currently?
Flags: needinfo?(fabrice)
| Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #1)
> In general we really want to not do that. That will need some code in gecko
> to move around files that are specific to a gaia app, which we absolutely
> want to avoid.
It's not specific to a Gaia app, but a preload feature that available to all preload apps.
However, on second thought, I tend to think my proposal has too many loose ends; the app would still have to deal with database upgrade and ship source JSON file, so we would ended up duplicate the data.
Another point is that and we really shouldn't dump more feature to packaged app handling, which is supposedly a workaround before we figure out now to do everything on the Open Web.
> How slow is this currently?
It's hard to describe. The phone (I tried ZTE Open) is still useable during the db population; the slowness "feels" like when FOTA is being decompressed.
Anyhow, I will try to improve the corrent approach. I can make the IME depend on the JSON itself now while database is being populated, so it doesn't really matter how long it takes, as long as the IME doesn't OOM and got killed because of the in-memory JSON objects.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•