Hi.
I have large database which should be updated periodically. Update
process is long enough and takes up to 10 seconds.
Also I have one ListView with short description of objects. On item
click activity with full object info should be shown.
The problem is: object information storing in database and if update
is performing its impossible to read necessary data due to locks in
Java access layer to database.
There are two cases: I may block UI until update finished, or
information activity may be shown with empty labels and fills after
update process finished.
Both variants seems ugly to users.

To reduce lock times, I make copy of *.db file, apply update data to
it, and after INSERT and UPDATE statements completed, swaps original
and updated *.db files. This technique reduce lock time to ~50 ms. But
it increases total update time up to 5 seconds.

Do you know other practices to deal with such situations? Maybe right
solution is to implement Java wrapper on SQLite native functions
without thread locks?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to