The only suggestion I have is that some thread does not allow to work
other threads. Turning profiling on slows down this thread so others
have more chances to do their work.

On May 25, 3:41 pm, Habba <olli.alat...@gmail.com> wrote:
> Hi,
>
> I'm working on a game which uses OpenGL 1.1 and Android 2.3
>
> 95% of the code is c/cpp code, which is run natively. That includes
> game logic loops and drawing.
> the remaining 5% of java code is for taking advantage of all kinds of
> services (open/hide soft keyboard, open browser, ad-views, game
> service components, etc..)
>
> I have a GLSurfaceView for drawing, and in onDrawFrame I call my
> native code which does all the game state updating and OpenGL drawing.
>
> On higher end devices, frame rate is good and rather stable, but on
> lower end devices (ZTE Blade, Wildfire S) FPS is very low (10-12).
>
> I had already given up on the idea that I could increase the fps to
> acceptable levels (20+), when I accidentally turned Method Profiling
> on from Eclipse. Suddenly, the game ran around 30fps and was smooth as
> any.
>
> I also managed to pull the same result by applying
> Debug.startMethodTracing() at my activity's onStart().
>
> Anyone has any idea why doing MethodeTracing would increase the FPS so
> dramatically (or raise at all, to begin with)? First I thought that
> maybe it's about thread priorities, but no priorities were changed.
>
> The game has quite a few threads going on... one for draw/updating,
> one for event queue, android probably has it's internal thread for
> handling UI events, and then there's some threads from 3rd party
> application.
>
> Android SDK says that startMethodTracing would make VM run slower than
> usual. I gave my game loop/drawing thread a max priority, and that
> seemed to increase the FPS a little bit, but I'm still very far away
> form the magnificient results of startMethordTracing.
>
> The question is: what the heck does that thing do??

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