Not randomly, and not just the GC. The only thing special about the GC
is there's a minimum amount of work it does, but the basic problem is
the amount of background work, not just the GC.

Even though you may see a correlation with the GC messages and your
observed slowdowns -- there will be more numerous, smaller glitches
that you're not seeing, and a different set of background apps will
give you a different behavior, including larger slowdowns with NO GC.

That's NOT to say, however, that improvements in the GC won't help.
Larger pauses are worse than shorter ones. But in any case, the only
immediately useful analysis is to ignore GC in other processes, and
just focus on processor time and memory consumption. Because GC time
and other processor time have the same effect on your app, it really
doesn't matter to you which it is.

In YOUR app, of course, that's entirely different -- you can do
something about it there.

I think a game mode is a good idea. I wouldn't make it absolute -- I'd
put an upper bound on how long game mode will defer background
processes without interaction, and give some control over what sorts
of things it defers. The alarm telling you it's time to catch the last
bus home might not be something you want to miss. Even though the
player may want to focus on your game right now -- your game may not
be the most important reason he has the device!

I don't know if Google wants to say anything more specific about their
GC plans, but Fadden indicated in another thread that they should be
able to put in more resources on the GC now. This was in the context
of compacting vs non-compacting, but most incremental algorithms are
compacting in nature, as well as many concurrent ones. So my
speculation (informed by long knowledge and experience with GC and GC
implementation, but totally devoid of any knowledge of the Android
development team's plans) is that we can expect improvements in this
area, but probably not very soon. I'd love to hear more from Google
about their GC plans, of course. They can even hire me to work on it,
if I don't have to commute to Mountain View! :)

On Mar 14, 6:20 am, markusn82 <markus...@gmail.com> wrote:
> From what you guys have said so far, it really does seem like the main
> problem is the GC randomly executing from other processes. This seems
> to be a big issue for real-time games on the platform.

> 1) Improved virtual machine with less intrusive GC (concurrent/
> incremental).
>
> 2) Add in a "game mode" along the lines of what Robert suggested
> above.
>
> In any case, having the GC "stop the world" at random points in time
> is really a blocker right now for real-time games. Google, do you have
> any plans to address this in future Android releases?

-- 
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

Reply via email to