Closed Bug 1099090 Opened 10 years ago Closed 7 years ago

getDeviceStorage yields OOM

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: andre.jaenisch, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 Steps to reproduce: In my Alcatel OneTouch Fire running Firefox OS v1.3 I inserted a 32 GiB SD card which is almost full (30 GiB). I can open any app searching my SD card: PDF viewer, File Manager, Firetext etc. Actual results: After I get some results (lucky case) the app crashes. While searching the SD card, the UI is unresponsive (synchronous call?). I assume an OOM. Expected results: I'd like to have a paging mechanism or the option to load only N bytes into memory, whereby N is defined by the app developer. This way a reasonable value can be set for the hardware. Otherwise GiB of data seem to be loaded into MiB of RAM …
As tested a few minutes ago, Firetext managed it to not crash. However, I'd like to specify the API further.
One way to handle this might be to implement a "deep" parameter for DeviceStorage.enumerate(). If "deep" is "true," then DeviceStorage.enumerate() will return the contents of the directory specified by "path," and the contents of its sub-directories. If "deep" is "false," DeviceStorage.enumerate() will only return the immediate children of the "path" directory. "deep" could default to "true" to be backwards-compatible.
See Also: → 1104337
The "deep" option is a real need!
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.