count cache hits
Summary: @public Adds cache hit counts to layout stats. Reviewed By: SidharthGuglani Differential Revision: D13844022 fbshipit-source-id: 906b4ec5fe3314287911cee2c37d77c4aac76455
This commit is contained in:
parent
0dafa0de6b
commit
f506019e8b
|
@ -20,6 +20,8 @@ typedef YG_ENUM_BEGIN(YGMarker){
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int layouts;
|
int layouts;
|
||||||
int measures;
|
int measures;
|
||||||
|
int cachedLayouts;
|
||||||
|
int cachedMeasures;
|
||||||
} YGMarkerLayoutData;
|
} YGMarkerLayoutData;
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
|
|
|
@ -3803,6 +3803,9 @@ bool YGLayoutNodeInternal(
|
||||||
layout->measuredDimensions[YGDimensionHeight] =
|
layout->measuredDimensions[YGDimensionHeight] =
|
||||||
cachedResults->computedHeight;
|
cachedResults->computedHeight;
|
||||||
|
|
||||||
|
(performLayout ? layoutMarkerData.cachedLayouts
|
||||||
|
: layoutMarkerData.cachedMeasures) += 1;
|
||||||
|
|
||||||
if (gPrintChanges && gPrintSkips) {
|
if (gPrintChanges && gPrintSkips) {
|
||||||
YGLog(
|
YGLog(
|
||||||
node,
|
node,
|
||||||
|
|
Loading…
Reference in New Issue