java - Should I care about the difference between main thread and UI thread in Lollipop and beyond? -
before lollipop, life easy. had main thread
- called ui thread
- in gui stuff done (and avoided under circumstances long-running operations avoid kind of hiccup), , had background threads
did long-running stuff.
now in lollipop , later versions of android, iirc term ui thread
seems point user new renderthread
, thread example used animate ripples, hero elements between activities or other kind of animation needs happen while main thread processes input events or busy creating new stuff in background.
with android studio 1.3 3 thread types got own annotation, denote particular piece of code should run on particular thread. me question is: should app developer care run anything on uithread
, i.e. renderthread
, , such ever use @uithread
in application?
i remember on chet haase's presentation of renderthread
last year's google io. statement was, in first place have continue mainthread
before. renderthread
used animations only. instance, if have method ondrawframe()
drawing animation @ smooth 60 fps, should rather call in renderthread
, because mainthread
can slowed down application logic or other stuff.
back question. use mainthread
before. if experience performance issues animations, try move drawing parts of code rendererthread
.
Comments
Post a Comment