Hi Dianne,

> If performance is your main goal, a binary data blob with your own defined
> structure is a likely candidate.  The current asset manager has a limit of
> 1MB for reading a compressed data stream; if you are wanting to do random
> access, you could store it uncompressed in the .apk and open a direct fd to
> it, but then you are facing the issue of creating an overly-large .apk.
>
> You haven't really specified enough about what you are trying to do to be
> able to offer a concrete solution.  How much data are you talking about?
>  How do you want to access it?  How often do you need it?

For my current application I have two different needs:

1. Some static data (~70k binary, ~1000 objects) that has to be
accessed at all time and is read in completely on startup. Currently I
am storing this data in a SQLite DB in the res/raw/ folder because any
other option (serialization or XML: >3000ms, CSV: >1000ms) was slower
than SQLite (~500ms). Yet the SQLite file has to be copied to the
cache directory in order to access it.

2. Some cached data (up to ~50k) with up to 75 objects for each data
unit. The serialization of each data unit takes between 50 and 200 ms.
But for me it is much easier to serialize these objects and put them
into a SQLite DB as BLOB than to create a complex SQL structure for
it. Nevertheless: The unserialization process takes up to 5 seconds,
which is way too long.


Regards

Marc Reichelt   ||   http://www.marcreichelt.de/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to