@Dianne - my assumption was that since all of the fields in the flat
file need to be searchable, then a database would be the best
approach. I'm wondering how this can be done without a database. Maybe
a file for each index - each entry consisting of key-value pairs. For
performing a lookup on the index, do some kind of binary search. Is
this what you mean?

@skink, @lucky4me - thanks for the optimization tips. I'll try those
out. I was kind of assuming that the lion's share of the CPU usage was
being done in the DB so I haven't even started on the java-side of the
optimization. I'll post some new results soon.

@skink - the gzip compression would only be useful for when
downloading the data, wouldn't it? After installation/first-time-
initialisation, wouldn't all the data be best stored uncompressed?

On Sep 3, 2:21 am, skink <psk...@gmail.com> wrote:
> On Sep 2, 8:00 pm, Dianne Hackborn <hack...@android.com> wrote:
>
> > Is a database really the right thing at all?  Generally a dictionary has
> > very special/optimized look up (see for example the latin dictionary) and
> > you are going to be able to get much much better space usage and lookup
> > performance by having a dedicated data structure rather than relying on a
> > very general-purpose SQL database.  Especially if your database is fixed
> > contents (not user editable), a database seems like significant overkill to
> > me.
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
>
> i agree with Dianne, if you have string key/value data and #rows is
> quite large (hundrets of thousands) typical sqlite db would be huge -
> with simple gzip compression you could have your data 1/3 smaller
>
> pskink
--~--~---------~--~----~------------~-------~--~----~
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