Application gets slower each time.

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Application gets slower each time.

Postby millerni456 » Tue Oct 25, 2011 4:17 am

Hello, I think I have an error relating to the android life cycle, but I'm not sure.

In my app (a game) the FPS will be slower each time the application is run.

For example, the first time you run it after installation FPS maxes at 14.
The second time is 12.
Third, the fps < 12.

I'm not sure why this is. I am using OpenGL to draw, and perhaps I am loading things more than once.
Anyways, I've been researching and trying to fix this, by trying to cleanup or by prohibiting certain segments of code running more than once. But I've had no luck.

I want to say that the slowness each time continually delays certain actions of the game; I'm not just worried about lowering FPS statistics.

So... I want to know if there is a way to completetly restart everything related to my application. (Not a second installation, but an un-tainted activity that does not save any states whatsoever). This would create a first-time run activity each time.

And if that is impossible, what could I be doing wrong? For you OpenGL experts out there... what should I consider when cleaning up? I have VBO's, Textures, Sounds, etc... but I'm 90% sure that none of these affect my fps. My textures release the input-stream after creating the opengl Texture object. The sounds are unloaded via AudioManager (also uses SoundPool). The VBO's dont need to be unloaded?

What I think is happening is that I am duplicating everything:
Instead of having 1 VBO, it places 2 Identical VBO's in the same locations.
Same with idea with textures.

Any advice/help is greatly appreciated. Even simple advice saying something is possible (just you don't know how) :P

Thanks, Nick.
Junior Developer
Junior Developer
Posts: 12
Joined: Wed Oct 05, 2011 12:39 am


Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests