Many Android layouts from the View package (RelativeLayout, ConstraintLayout, LinearLayout with weights) are notorious for double-taxation problem that required their child views to be measured twice, thus in the deep-tree structures the amount of calculations could grow exponentially.
I still cannot understand how Compose resolves this. The API enforces a single measure call for any Measurable object in layouts. But how does Compose solve the calculation of such layouts without two measure passes, and why wasn't it possible to implement in the View package?
It is really hard to find any in-depth explanation of why two passes were needed for some of the layouts (e.g. weighted LinearLayout), and how it is handled nowadays in Compose. All the statements about the past problems of the View hierarchies and the current benefits of composables are usually given without much algorithmic explanations.
Please explain this to me if you have a better knowledge about the topic. Links to good explanation articles are also appreciated.