You figure for every millisecond another process spends on GC, it probably spends 10 ms doing something else, which also interferes with your game. (That's an illustration, not an estimate -- the number will vary WILDLY depending on the application in question).
Airplane is indeed likely to help, for the reasons you state. But focusing on GC specifically, as opposed to background activity generally, is pretty arbitrary, EXCEPT for the issue of size of the chunks. In your own process, of course, avoiding allocations is a productive activity in these circumstances. (Not everybody, just real-time games, etc.) For what it's worth, my understanding of the state of the Dalvik GC is that there's room for considerable future improvement in this area. GC does not INHERENTLY involve long lags, but there are a lot of tradeoffs -- including complexity of the algorithm. I don't fault the team for going with a simpler approach initially, even though it's not ideal for your purposes. Worse for everyone would be a flakey GC! On Mar 14, 1:42 am, Lance Nanek <lna...@gmail.com> wrote: > >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. -- 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