I have a been working on a game for Android and debugging it on my N1. The performance was patchy at first. I then worked on cleaning up all allocations to prevent garbage collection. This greatly improved things, but I still saw some garbage collections occurring that caused very brief pauses in the animation.
After pulling my hair out for a while, I then noticed the process IDs that were doing garbage collection (GC_FOR_MALLOC) were not my process id. The Process Ids belonged to "Android System" and android.process.acore (determined by using "Android System Info" app from the market). The acore process was tied to a desktop widget called digital clock. I uninstalled the widget and nearly made it through the entire game without any pauses. There was one very brief pause for GC for "Android System".
Sorry for the long explanation, but now for my questions:
I just feel like there is something I am missing since other games don't have this problem.
Thanks
Can you decrease the frame rate of your game? Maybe it's using 100% of the CPU so anything else that consumes CPU is going to make it lag. These devices are not nearly as fast as your average PC. You could also look at reducing the CPU required to create each frame in order to keep the frame rate high enough to be smooth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With