Colton Idle
01/24/2021, 2:28 AMjim
01/24/2021, 2:30 AMColton Idle
01/24/2021, 2:34 AMColton Idle
01/24/2021, 2:34 AMjim
01/24/2021, 2:37 AMAlexjlockwood
01/24/2021, 2:40 AMColton Idle
01/24/2021, 2:45 AMAdam Powell
01/24/2021, 2:51 AMmeasure
to always come before layout to configure mutable state for later, so if you measure a child several times speculatively, you may have to measure it at its determined size one last time. When a child view requests layout the API doesn't communicate why, and we don't know if that child's measurement affected the parent's size or not, which means we have to re-run more work than we might otherwise need to requesting layouts up the parent chain. These things all combine to defeat a lot of potential caching opportunities; we just have to run more code and repeat the work.Adam Powell
01/24/2021, 2:53 AMLinearLayout
to measure all of its children more than once; baseline alignment being on by default for horizontal layouts combined with weighted children leads to a bunch of it.Adam Powell
01/24/2021, 2:57 AMConstraintLayout
for views gets to skip a lot of that and make more assumptions internally in analogous ways to Compose establishing a different contract for layouts when you have Compose UI elements inside Compose UI containers. We have more fine-grained invalidation data, we cache more, and we avoid more worst-cases.jim
01/24/2021, 3:01 AMAdam Powell
01/24/2021, 3:04 AM