Skip to content

Commit 71c3c23

Browse files
davidaureliofacebook-github-bot
authored andcommitted
Reduce measure cache size to 8
Summary: @public Reduces measure cache size to a number that is enough for 95% of nodes, according to our (FB-internal) measurements. Node size: 776b -> 584b Reviewed By: SidharthGuglani Differential Revision: D15183567 fbshipit-source-id: 9ae8cc78074271a015e7618b931ba0356de87a0c
1 parent d4d463b commit 71c3c23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ReactCommon/yoga/yoga/Yoga-internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ struct YGCachedMeasurement {
9191
}
9292
};
9393

94-
// This value was chosen based on empiracle data. Even the most complicated
95-
// layouts should not require more than 16 entries to fit within the cache.
96-
#define YG_MAX_CACHED_RESULT_COUNT 16
94+
// This value was chosen based on empirical data:
95+
// 98% of analyzed layouts require less than 8 entries.
96+
#define YG_MAX_CACHED_RESULT_COUNT 8
9797

9898
namespace facebook {
9999
namespace yoga {

0 commit comments

Comments
 (0)