0a20f47021
Summary: @public This diff changes how we store and manage Yoga Config in layoutable shadow nodes. Previously we have `shared_ptr` to single shared yoga config (one to many relationships); now we initiate and store yoga config with yoga node (one to one relationship). Cons: - Less memory efficient. Pros: - Much more flexible model. Configuration can be tweaked on a per-node basis. - More performant. Dealing with `shared_ptr` is expensive because of atomic ref-counter. (This is not really applicable for the previous approach but would be applicable for any alternate approach where we want to have more granular control of the configuration.) Data locality is also great in the new model which should positively impact performance. - Simplicity. Any alternate approach where we manage sets of nodes which share the same configuration is going to be quite complex. Reviewed By: fkgozali Differential Revision: D8475638 fbshipit-source-id: 5d73116718ced8e4b2d31d857bb9aac69eb69f2b |
||
---|---|---|
.. | ||
YogaLayoutableShadowNode.cpp | ||
YogaLayoutableShadowNode.h | ||
YogaStylableProps.cpp | ||
YogaStylableProps.h |