[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Dianne Hackborn
On a touch screen it is basically impossible to not move your finger. On Fri, Aug 14, 2009 at 1:14 PM, Dmitry.Skiba wrote: > > Thank you all for replying. > > Sleeping in onTouchEvent is an interesting idea, I will try that. > But results in my first post where obtained while *not moving* finger

[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Dmitry.Skiba
Thank you all for replying. Sleeping in onTouchEvent is an interesting idea, I will try that. But results in my first post where obtained while *not moving* finger at all. Well, maybe there are fluctuations in determining my finger's position, and events were arriving nevertheless. I will check t

[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Jiri
I see, thanks a lot. Jiri Streets Of Boston wrote: > E.g. when you handle the ACTION_MOVE in your touch-handler, just do a > Thread.sleep(20) before your method returns. > > If you don't have a touch-handler in your app, just register one and > only do the Thread.sleep(20) when handling the ACT

[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Streets Of Boston
E.g. when you handle the ACTION_MOVE in your touch-handler, just do a Thread.sleep(20) before your method returns. If you don't have a touch-handler in your app, just register one and only do the Thread.sleep(20) when handling the ACTION_MOVE. On Aug 14, 3:32 am, Jiri wrote: > Could someone ple

[android-developers] Re: Simply touching screen reduces fps

2009-08-14 Thread Jiri
Could someone please post a snippet on how to do this? Jiri Dianne Hackborn wrote: > And the solution is NOT to increase your thread priority so you can > better "fight" with the system. You will get better results by putting > in the sleep so you aren't fighting. > > On Thu, Aug 13, 2009 at

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Dianne Hackborn
And the solution is NOT to increase your thread priority so you can better "fight" with the system. You will get better results by putting in the sleep so you aren't fighting. On Thu, Aug 13, 2009 at 3:32 PM, Justin (Google Employee) wrote: > > The recommendation for this is to sleep in the tou

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Streets Of Boston
For me a sleep of about 20millisecs was most effective. Note that this only works if your opengl render-thread is a seperate thread (not the main gui-thread). On Aug 13, 6:32 pm, "Justin (Google Employee)" wrote: > The recommendation for this is to sleep in the touch event handler. > The system

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Justin (Google Employee)
The recommendation for this is to sleep in the touch event handler. The system will send you touch events as fast as you can process them. If you artificially decrease this by sleeping in the handler, you will allow more processing time for other threads which are theoretically running your comput