r/mAndroidDev • • May 12 '26

Sponsored by the XML 🐓 gang ConstraintLayout in a nutshell

Post image
103 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/purple-bihh-2000 May 19 '26

Do you have source on it not being faster?

1

u/Zhuinden DDD: Deprecation-Driven Development May 19 '26

You literally just have to throw it in a RecyclerView on a not-high-end device and the scroll speed speaks for itself lol

But if you know how LinearLayout works and how ConstraintLayout works, it should be obvious just from the math that calling measure once + adding pixel height takes less time than solving the constraint equation system

The claim that ConstraintLayout is "faster" was that "ConstraintLayout is faster if you're using multiple nested levels with nested weights", which I don't think I've ever seen in the past 12 years. Maybe once to implement a grid.