incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon MacDonald <simon.macdon...@gmail.com>
Subject Re: apache-cordova - FileReader#readAsTextFile throws OOM when reading local file
Date Thu, 06 Sep 2012 14:55:49 GMT
It's just too much memory for the HTC Desire to handle. Each application
has a piece of the system memory on the HTC Desire the RAM is 384 MB while
on the Samsung Galaxy S2 has 1 GB or RAM. I'm making the assumption that
the available memory for each application is much smaller on the HTC device
as it has one third the memory of the Samsung and that's probably why you
are getting the OOM exception.

Simon Mac Donald
http://hi.im/simonmacdonald


On Thu, Sep 6, 2012 at 8:21 AM, Clemens Wyss - MySign AG <
clemens.wyss@mysign.ch> wrote:

> Hi all (me being new to this mailinglist),
>
> Context:
> cordova 2.0-app on my HTC Desire (Android 2.3.7)
> jQuery 1.7.1
> jQuery.mobile 1.1.1
>
> I try to read a json file (2.5MB) from my HTC Desire.
> fileReader.readAsTextFile(...) throws an out of memory exception.
> Is 2.5M "too much"?
>
> Thx
> Clemens
>
> Note 1:
> I am able to download the very file (through $.ajax) and save it locally
> using FileWriter. Could it be that in "this case" the file is being
> streamed and not completely read into RAM?
>
> Note 2:
> Having no problem on a Samsung Galaxy2 with Andorid 4.03
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message