I am having an issue with my latest game (available in the market as "BreakTheBlocks Lite")
This is a simple "arcade" style game, It started with a thread controlling the game loop but now I just have a runnable that performs the game loop functions and then posts back to itself. In its original release there was a noticeable "stutter" in the game every other second or so. After a great deal of time debugging I finally realized that every time the stutter happened LogCat showed that garbage collection was taking place. I went through my code and got rid of creating as many "temporary" objects as possible. After that the stutter went from happening every 1.5 seconds to happening every 13-16 seconds. This is much better, but I can't seem to reduce the time any further. According to LogCat the garbage collector is still running on my game thread every 15 seconds I see the message "GC freed 19833 objects / 878848 bytes in 131ms"... and since my game runs at about 30 frames a second a 131 millisecond stutter causes about 4 frames to be dropped which is an annoyance for me and the users of my game. So my question is What can I do to further debug this problem? I have always known garbage collection existed but I have never bothered to care about it until now because it is finally affecting the performance of my app (and I am a C++ programmer by day so I usually forget about the GC) Is there any way to see what the garbage collector is collecting? Is there any way that I can tweak the behavior of the GC for my app? Sorry for the long winded question and thank you in advance for any responses --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---