I changed this to loading the database in from an asset and it works
fine.  But the issue is now the loading time.  On the emulator it
takes over 5 seconds for the list to be populated.  And when doing a a
filter (getListView().setTextFilterEnabled(true);) it takes almost 10
seconds to filter the list.  Is it unreasonable to think that about
9000 entries should be sorted faster?

Mark,

Does your book talk about handling this type of stuff?  I see that
version 2.0 is not in print so I plan to pick it up.

David

On Mar 10, 8:19 am, Mark Murphy <mmur...@commonsware.com> wrote:
> NFSpeedypur wrote:
> > I am trying to on first start up fill up a sql database with the
> > default values.  This database is around 9000 entries and it is
> > causing the app to go over the 16MB heap.  I am trying to find a way
> > to do this so that it will not cause this over flow.
>
> > At the moment I am running the 9000 inserts, 1 after another in a
> > thread.  Are there any other suggestions?
>
> Use transactions. The heap problem is probably due to SQLite holding
> everything in transaction buffers. You might, say, do a transaction for
> every 100 entries or so.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to