Monday, May 30, 2011

[android-developers] Re: SQLite DataStorage write frequency?

It writes on every commit. Unless you explicitly start/end
transactions, a commit occurs after each insert/update.

On May 29, 12:24 pm, Andrew Pamment <pamm...@gmail.com> wrote:
> Hi
>
> I'm writing a game that uses SQLite storage to keep the game objects
> persistent through restarts etc. I'm wondering how frequently I can
> update records? Should I do it only when the game closes, or whenever
> the object changes? Given that the object changes every 10 seconds I'm
> worried it would reduce the life of the internal storage, on the other
> hand it would be good if it saved the data should the battery run out
> mid game.
>
> So I'm thinking I should make it autosave every X amount of time, I'm
> just not sure what a reasonable value for X is.
>
> Thanks,
> Andrew

--
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