Hey folks,

So I'm in the midst of creating a game and I'm hitting some occasional slow 
down which "seems" to be a result of GC calls triggered by other processes 
on the device.  I have profiled *my* app and am 100% certain there are no 
allocations going on while the game is running, but in certain 
circumstances (i.e. most of the time) logcat is spewing out GC_CONCURRENT 
freed...blah blah entries.  Here's a typical output from the console:

03-30 23:58:58.868: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8758K/9224K, paused 5ms+3ms, total 29ms
03-30 23:59:05.970: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 408K, 6% free 
8757K/9228K, paused 4ms+2ms, total 30ms
03-30 23:59:13.063: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 4ms+4ms, total 33ms
03-30 23:59:20.142: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9228K, paused 5ms+3ms, total 30ms
03-30 23:59:27.227: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 6ms+2ms, total 31ms
03-30 23:59:34.306: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9232K, paused 4ms+2ms, total 23ms
03-30 23:59:41.392: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9224K, paused 4ms+2ms, total 27ms
03-30 23:59:48.470: DEBUG/dalvikvm(2590): GC_CONCURRENT freed 407K, 6% free 
8757K/9232K, paused 5ms+2ms, total 30ms

Now I have no idea which processes are to blame, but I did notice that when 
"other" events on the device occur it can lead to a spike in (I assume) CPU 
usage which causes a visible drop in frame rate in the game.

For example my wifi connection dropped out one time and the logs went crazy 
with other processes complaining about a lost connection and trying 
desperately to tell me about it.  This caused a fairly severe jolt in the 
game dropping the frame rate from 60fps to around 20fps for about a minute 
while everything settled down and got on with things.

I had noted on a previous 
thread<https://groups.google.com/forum/?fromgroups=#!searchin/android-developers/Garbage$20collector$20suspend/android-developers/85yj9CZEqH4/YIiElemqiuoJ>a
 statement from Dianne Hackborn:

*"as of 1.6 such GCs in a background process can not together take more 
than ~10% of the CPU from any foreground process that wants to run."*

This sounds good, but I'm wondering if this is still the case as of 4.2.2? 
 I am seeing behavior that appears to indicate this may not the case.

Is there anything I can do to ensure other processes are not using more 
than 10% of CPU (or any number really)?  Or some other 
restrictions/priorities that might help alleviate this external resource 
usage?

Thanks,

Jason.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to