Optimize edge value resolution
Summary: Noticed in simpleperf this was a very hot method, showing 8ms spent in these methods in our sample application. By splitting the method out in a horizontal and vertical variant we can simplify cases enormously and check for begin/end in one go. Changelog: [Internal] Reviewed By: SidharthGuglani Differential Revision: D27010008 fbshipit-source-id: 22fed58c7476e1d716b0191b55997c7a06e63223
This commit is contained in:
committed by
Facebook GitHub Bot
parent
342aebe1d7
commit
41384fab7b
@@ -193,6 +193,17 @@ public:
|
||||
return resolvedDimensions_[index];
|
||||
}
|
||||
|
||||
static CompactValue computeEdgeValueForColumn(
|
||||
const YGStyle::Edges& edges,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue);
|
||||
|
||||
static CompactValue computeEdgeValueForRow(
|
||||
const YGStyle::Edges& edges,
|
||||
YGEdge rowEdge,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue);
|
||||
|
||||
// Methods related to positions, margin, padding and border
|
||||
YGFloatOptional getLeadingPosition(
|
||||
const YGFlexDirection axis,
|
||||
|
Reference in New Issue
Block a user