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 3:32 PM, Justin (Google Employee) 
> <j...@google.com <mailto:j...@google.com>> wrote:
> 
> 
>     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 computations for screen updates.
> 
>     Cheers,
>     Justin
>     Android Team @ Google
> 
>     On Aug 10, 9:38 am, sahn0 <dmitry.sk...@gmail.com
>     <mailto:dmitry.sk...@gmail.com>> wrote:
>      > Yes, it is.
>      >
>      > Try SpriteMethodTest, set 100 sprites, select OpenGL / Use VBO,  let
>      > it run for a while. You will get something around 20ms / 50 fps. Now
>      > run it second time, and simply touch screen while test is
>     running. You
>      > will get something around 35ms / 29 fps. So it is 15 ms difference.
>      >
>      > As I understand, the answer is simple - it is that dispatcher thread
>      > running with THREAD_PRIORITY_URGENT_DISPLAY priority.
>      >
>      > Setting THREAD_PRIORITY_URGENT_DISPLAY priority (will it work on non-
>      > ADP firmware?) on renderer thread yields 30 ms / 33 fps.
>      >
>      > Are there any other workarounds?
> 
> 
> 
> 
> -- 
> Dianne Hackborn
> Android framework engineer
> hack...@android.com <mailto:hack...@android.com>
> 
> Note: please don't send private questions to me, as I don't have time to 
> provide private support, and so won't reply to such e-mails.  All such 
> questions should be posted on public forums, where I and others can see 
> and answer them.
> 
> 
> > 

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