On Feb 19, 8:21 am, Mariano Kamp <mariano.k...@gmail.com> wrote:
> Ok, now the guesstimeasurement I do is that I look at the time the
> background is yellow. This time is very brief, when the background thread is
> not running and went to 4 seconds when the background thread is running and
> half of that when the background thread is running with the background prio.
>
> Maybe that is already what can be achieved? I was expecting that the
> foreground activity (the db update etc.) with a running background activity
> would be almost as fast as without a background activity when using the low
> prio.

It seems to me that your problem is less to do with CPU usage and
scheduling than it is to do with contention on the database.
Presumably the background thread is also updating the database as it
downloads new articles. Does it hold locks on the database for a long
time while it is doing that? If you yield or sleep that thread while
it holds a lock then it will still not let the other thread update the
database.

--
Jon

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

Reply via email to