mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
Don't create an instance of FontStylingSpan until any of the properties changed
Summary: Minor optimization/cleanup: instead of creating an instance of FontStylingSpan for every RCTVirtualText, start with a global immutable instance of use copy-on-write when any of the properties change. Reviewed By: ahmedre Differential Revision: D2817156
This commit is contained in:
committed by
Ahmed El-Helw
parent
c43d8409c0
commit
f98a288c2a
@@ -50,6 +50,7 @@ import com.facebook.react.uimanager.ViewProps;
|
||||
|
||||
public RCTText() {
|
||||
setMeasureFunction(this);
|
||||
getSpan().setFontSize(getDefaultFontSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user