I need to be able to scroll through a list with (up to) 20K rows,
backed by a cursor on a read-only db.
Testing 20K rows on a G1, the query takes approx .02s regardless of
table size, while binding the adapter to the list takes 4.5s. Note
that this is before the view calls used in rendering.
in that the UI doesn't just freeze while
it's working.
On Jan 31, 10:01 pm, THill thill.dr...@gmail.com wrote:
I need to be able to scroll through alistwith (up to) 20K rows,
backed by a cursor on a read-only db.
Testing 20K rows on a G1, the query takes approx .02s regardless of
table size
Thanks Mark.
Use the LIMIT and OFFSET terms on your SELECT statement to obtain data in
smaller chunks. Create a wrapping adapter (like my EndlessAdapter) that
only loads chunks when the user scrolls to the bottom of thelistand
therefore needs more data.
Doing the load in smaller chunks
Thanks Mark.
Use the LIMIT and OFFSET terms on your SELECT statement to obtain data in
smaller chunks. Create a wrapping adapter (like my EndlessAdapter) that
only loads chunks when the user scrolls to the bottom of thelistand
therefore needs more data.
Doing the load in smaller chunks
Thanks.
Mark's comment about the object roster is what I was curious about.
SimpleCursorAdapter calls Cursor.moveToPosition() every time the list
calls bindView(), so I was wondering what the cursor does with result
set when -- i.e., does it create objects (presumably indexes into
the db file)
That's what I feared. I was hoping the cursor was only keeping
primitive references to the data in the db file.
If I'm going to be doing many smaller queries keeping the results
around, sounds like I might as well keep the objects myself. Lets me
index across the varying data density also.
Because that's what a smart person would do I'm an idiot for not
thinking about it before asking grin. That's two whacks -- I'm
outta here.
Need more caffeine...
Cheers,
tim
On Feb 2, 3:10 pm, Mark Murphy mmur...@commonsware.com wrote:
There's still the lifecycle handling -- if I have this
What you say makes sense Bob, but testing seems to indicate the
Android SQLite implementation isn't so proper.
I have a simple app that creates 20001 rows in a table, each with an
int _id 2 varchar fields.
Getting the count of rows via db.rawQuery(select count(*) from
table, null) and getting
On the NexusOne, there is a known issue with onStop not being called
soon after an activity is no longer visible (e.g., by pressing Home
key, or calling finish()). See related forum threads
http://code.google.com/p/android/issues/detail?id=6094.
If my activity uses a service that is doing
The default way configuration changes (i.e., rotates) are handled is
to destroy the activity recreate it with a new one. What is the
recommended way to handle these changes in an activity that binds/
unbinds to a service (that is possibly heavy/slow to start)?
When the activity gets destroyed,
to the next instance via
Activity.onRetainNonConfigurationInstance().
Yeah, sorry, obtuse and awkward. In the future I'd like to have something
better.
On Wed, Apr 7, 2010 at 4:44 PM, THill thill.dr...@gmail.com wrote:
The default way configuration changes (i.e., rotates) are handled
binding the service
to do a start of itself, and for the last unbind to post a delayed
stopSelf().
On Apr 7, 4:44 pm, THill thill.dr...@gmail.com wrote:
The default way configuration changes (i.e., rotates) are handled is
to destroy the activity recreate it with a new one. What
I've seen similar behavior as the OP.
I have a simple activity that starts a timer in onCreate, logging a
message every second. No wake lock is requested, so after the time
indicated in setting, the device sleeps (allowed to dim, then sleep
naturally, not with power button press). After letting
at the last set of stats (this is
the raw information used to generate the battery usage UI). However the
kernel wake lock information is extremely hard to understand, and
unfortunately I can't say for sure off-hand how to interpret it. :}
On Thu, Apr 22, 2010 at 10:52 AM, THill thill.dr...@gmail.com
14 matches
Mail list logo