https://kotlinlang.org logo
#android
Title
# android
s

Sergio C.

09/14/2019, 4:32 PM
hello people, Do you guys know any performance comparisons between kotlin synthetics, findViewById, Databinding, Viewbinding?
d

deviant

09/16/2019, 7:46 AM
actually @yigit claimed in one of his talks that databinding may be much faster then manual findViewById. because it passes the xml only once or something like this. can't remember the details though
s

Sergio C.

09/16/2019, 10:37 AM
@yigit can you tell us which one is better?
y

yigit

01/15/2020, 6:43 AM
it is not
much faster
. the only difference is that find view by id traverses the view tree for each view vs data bnding does it once, a small improvement. used to matter more in older days, i wouldn't care about it today at all. if you are just trying to access views, use view binding.
👍 2
2 Views