[Android Software/Hacking General [Developers Only]] ykphuah:
Dead Trigger played very smooth if I Force Stop every app on my Nexus S JB, but if I have the standard stuffs running, it will lag like hell. I monitored the logcat -b events for two session, and was so shocked to find out that Android have been killing and restarting some apps repeatedly when I was playing my game, causing what I belief to be the main reason for lag, I have written a simple perl script to process the logcat to generate this table.

For a 5 minute Dead Trigger Session

+------------------------------------------------------------+-----+-----+
|name |died |start|
+------------------------------------------------------------+-----+-----+
|com.facebook.katana | 9| 9|
|com.kebab.Llama | 8| 7|
|android.process.media | 7| 7|
|ownhere.google.android.apps.maps:LocationFriendService | 7| 7|
|ownhere.google.android.apps.maps:FriendService | 6| 6|
|ownhere.google.android.apps.maps:NetworkLocationService | 6| 6|
|com.facebook.orca | 5| 4|
|android.process.acore | 5| 5|
|com.google.android.talk | 5| 6|
|com.google.android.gsf.login | 4| 4|
|com.google.process.gapps | 4| 4|
|com.google.android.apps.uploader | 3| 3|
|com.google.android.gallery3d | 3| 3|
|com.google.android.apps.plus | 3| 3|
|com.google.android.youtube | 2| 2|
|com.android.vending | 2| 2|
|com.london2012.results | 2| 3|
|ownhere.google.android.apps.maps | 2| 1|
|com.asksven.betterbatterystats_xdaedition | 2| 1|
|com.skype.raider | 2| 1|
|com.android.settings | 2| 2|
|net.dinglisch.android.taskerm | 1| 1|
|com.google.android.deskclock | 1| 1|
|com.google.android.apps.docs | 1| 2|
|com.android.launcher | 1| 1|
|com.google.android.googlequicksearchbox | 1| 0|
|com.madfingergames.deadtrigger:com.urbanairship.push.process| 1| 1|
|com.madfingergames.deadtrigger | 1| 1|
+------------------------------------------------------------+-----+-----+
|Total | 96| 93|
+------------------------------------------------------------+-----+-----+
Earliest = 08-04 22:00:22.414, Latest = 08-04 22:05:56.867

For a 15 minutes session

+------------------------------------------------------------+-----+-----+
|name |died |start|
+------------------------------------------------------------+-----+-----+
|com.google.process.gapps | 33| 33|
|ownhere.google.android.apps.maps:LocationFriendService | 22| 22|
|com.google.android.gsf.login | 19| 19|
|com.google.android.talk | 18| 17|
|android.process.acore | 17| 17|
|ownhere.google.android.apps.maps:FriendService | 16| 16|
|ownhere.google.android.apps.maps:NetworkLocationService | 16| 16|
|com.facebook.katana | 15| 15|
|com.kebab.Llama | 14| 14|
|android.process.media | 11| 11|
|com.google.android.gm | 3| 2|
|net.dinglisch.android.taskerm | 2| 1|
|com.google.android.calendar | 2| 3|
|ownhere.google.android.apps.maps | 2| 1|
|com.android.providers.calendar | 2| 2|
|com.google.android.googlequicksearchbox | 2| 2|
|com.google.android.youtube | 1| 0|
|com.google.android.apps.uploader | 1| 0|
|com.google.android.deskclock | 1| 2|
|com.android.vending | 1| 2|
|com.lim.android.automemman | 1| 0|
|com.android.launcher | 1| 1|
|com.madfingergames.deadtrigger:com.urbanairship.push.process| 1| 1|
|com.google.android.gallery3d | 1| 0|
|com.dg.gtd.android.lite | 1| 1|
|com.google.android.inputmethod.latin.dictionarypack | 1| 1|
|com.asksven.betterbatterystats_xdaedition | 1| 0|
|com.google.android.apps.plus | 1| 0|
|com.madfingergames.deadtrigger | 1| 1|
|com.google.android.inputmethod.latin | 1| 1|
|com.google.android.partnersetup | 1| 2|
+------------------------------------------------------------+-----+-----+
|Total | 209| 203|
+------------------------------------------------------------+-----+-----+
Earliest = 08-05 18:38:07.382, Latest = 08-05 18:52:54.068

I find it mind blowing that process have been killed and restarted close to 200 times for a 15 minutes gaming session. I went through the code for ActivityServiceManager, and it seems that this code have no way of knowing when a process is killed by the lowmemorykiller!

I am starting to think that Android does need an Task Killer anyway. :mad:

Is there any effort at all to patch this in Custom Roms?