Canvas reflesh rate gets low

Problems with Canvas, OpenGL, etc...

Canvas reflesh rate gets low

Postby ruuhkis » Mon Mar 21, 2011 2:22 pm

Hello, i am having problems with my very first android game.
I've been working with java SE for very long time but i am more likely in first touch with android SDK!
I've made loop that continues until the game is closed which repaints screen throught "postInvalidate();", but for now the game seems to get too slow sometimes, and when i say slow, i mean the reflesh rate. But it seems if i make new thread(runnable) running on UI thread its even slower because UI threads seems to sleep cuz it thinks its not high prioritied to repaint the screen.
The question is this: how i can improve the performance of my game, or how can i make the UI thread not to sleep. Also i need any other advice with Invalidate/repainting/graphics/canvas. Thank you!
Junior Developer
Junior Developer
Posts: 12
Joined: Tue Feb 15, 2011 4:23 pm


Re: Canvas reflesh rate gets low

Postby raj_J2ME » Tue Mar 29, 2011 8:42 am

Welcome to the Android Forum.. :)

Well this type of behavior of the app can be due to multiple reasons.
1. the GUI of the app, how much rich is the GUI,
2. Size of the images, how much heavy images/resources are,
3. Your thread implementation which update the screen.

You read some tips about the optimization of the apps. Here these are,

The above URL includes some hints and it will be good checklist to check if you are following the same.
Thanks with Regards,
Raj - The Kernel
Master Developer
Master Developer
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,


Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 2 guests