Tuesday, August 16, 2011

[android-developers] Re: sqlite resultsets over 1 meg in size

Yes, there appears to be some sort of limit. The only manifestation
of it I've seen is when moving backwards in the cursor. You get a
bunch of junk in the log and it becomes painfully slow. Forward
scrolling seems fine.

On Aug 17, 6:43 am, goosedroid <alexrhel...@gmail.com> wrote:
> It seems that CursorWindow is limited to 1Mb in size. I thought this
> was a window into a larger result, but it seems it must contain the
> whole result.
>
> I considered multiple queries using limit/offset, but that also is a
> kludge and i worry as memory gets more fragmented, i will not even be
> able to allocate successive cursors.
>
> I thought maybe there would be a way around this using a custom
> Cursor.
>
> Has anyone seen any tutorials on implement such a cursor for this
> purpose? I have been unable to find any.
>
> Any other tips are greatly appreciated.
>
> ---
>
> I find it strange that JDBC drivers I have used in the past, used on
> machines in Java server environments with huge memory, efficiently
> page through the resultset and keep a limited amount of data in memory
> -- but on a resource constrained system, Android just tries to copy
> everything in the resultset into memory. I don't think this is a
> constraint of sqlite.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment