Skip to content

Commit

Permalink
added an experiment to check the impact of not setting baseline funct…
Browse files Browse the repository at this point in the history
…ion on every yoga node

Summary:
Functionality where a child node can set itself as reference for baseline was added in Yoga

In litho we currently set baseline function on yoga node which returns the height of component. Added an experiment to check the impact of removing baseline function

Reviewed By: davidaurelio

Differential Revision: D13320942

fbshipit-source-id: ebec9d018712295c5c3d1be07dc73d40d8c57f19
  • Loading branch information
SidharthGuglani-zz authored and facebook-github-bot committed Dec 14, 2018
1 parent a8affb2 commit d40f809
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ InternalNode createLayout(ComponentContext context, boolean resolveNestedTree) {
// delegates its layout creation to another component i.e. the root node belongs to
// another component.
if (node.getRootComponent() == null) {
node.setBaselineFunction(sBaselineFunction);
if (ComponentsConfiguration.shouldSetBaselineFunctionOnYogaNode) {
node.setBaselineFunction(sBaselineFunction);
}

final boolean isMountSpecWithMeasure = canMeasure()
&& Component.isMountSpec((Component) this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,6 @@ public class ComponentsConfiguration {
* autogenerated ids
*/
public static boolean onlyProcessAutogeneratedTransitionIdsWhenNecessary = false;

public static boolean shouldSetBaselineFunctionOnYogaNode = true;
}

0 comments on commit d40f809

Please sign in to comment.