>neither you nor your users have >any control over the GC behavior of someone else's application.
Users do have indirect control, however. I often put my phone in airplane mode when testing because it reduces the number of GC events I see in the logs. I assume it is because other processes can't do as much without a network connection, so create less garbage and allocate less, and so trigger the GC less. I do it for the reason you state, though. There's no sense in me trying to fix problems caused by other processes allowing the GC to fire. The GC is a huge problem for real time games due to the amount of time it takes. If a user emails and complains about lag, though, mentioning that airplane mode for non-networked games and/or turning off background options in other apps can sometimes help is a step above saying there's nothing that can be done at least. On Mar 14, 3:58 am, Bob Kerns <r...@acm.org> wrote: > There's nothing in what you describe to suggest it's the GC in other > processes. > > GC is just a component of what happens in a process -- and it's always > a side-effect of the process doing other things. > > You're probably right in that it's other processes, but wrong to pin > it specifically on the GC. > > It's possible, however, for the GC to happen in a bigger chunk than > the series of short executions that eventually trigger it. So the GC > may contribute to the minimum size of a lag. Even then, it's not > useful to focus on GC as the cause, as neither you nor your users have > any control over the GC behavior of someone else's application. > > On Mar 13, 7:44 pm, markusn82 <markus...@gmail.com> wrote: > > > I developed and published a game about two months ago. Since then, > > I've received several negative comments about input lag in the game. > > Before releasing the game, I already took several measures to > > hopefully prevent lag from occurring: > > > 1) Game is almost entirely written in native code > > 2) After initialization, my process never invokes the GC during > > gameplay (no GC executions from my process show up in the log) > > 3) Average FPS is generally > 30 fps > > 4) I tested the game on both a Motorola Milestone and an HTC Magic and > > I don't experience any noticeable input lag (except perhaps when the > > GC is executed by other processes) > > > My guess is that the lag that users are experiencing is a result of > > the GC being invoked by another process. Has anyone been able to > > address this issue? Specifically, have any game developers been able > > to achieve a completely lag-free game and thus avoid negative ratings > > that drag down your app? > > > The only other suspicious thing I've noticed is the following lines > > showing up in my log any time a SoundPool clip is played: > > > D/AudioHardwareMot( 1054): AudioMgr:AudioStreamOutMot::standby called > > D/AudioHardwareMot( 1054): AudioMgr:Output 0xb538 entering standby > > D/AudioHardwareMot( 1054): AudioMgr:Closing stereo device > > D/AudioHardwareMot( 1054): AudioMgr:Output 0xb538 exiting standby > > > Any ideas or suggestions? > > > Thanks > > -- 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