> I am drawing a pretty simple scene, with one large texture the about
> size of the screen (two triangles). I notice that the frame-rate is
> irregular: in most of cases, a frame finishes in 17 ms. However, in
> about 1 of 10 times, the frame finishes in 33ms.

This could be the garbage collector.
Whenever the garbage collector is called, you can see a message in the
logcat, under the tag "dalvikvm", using log level debug.
If it is the GC, the way to fix it is to avoid allocating memory:
every time you allocate memory,
the GC wakes up to check if there is something to collect; just pre-
allocate all the objects you need,
and that´s it.
You can also call the GC manually, when the timing is good for you,
using the System.gc() call.

Fulanito.




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