react-native
react-native copied to clipboard
RN: Optimize `StyleSheet.compose`
Summary:
Changes two important aspects of StyleSheet.compose:
- Extract it from
StyleSheetso that it can be imported from other internal modules without incurring circular dependencies. (Surprisingly,StyleSheethas a lot of dependencies.) - Avoid a redundant
style1 != nullcheck.
Changelog:
[General][Changed] - Optimized performance of StyleSheet.compose
Reviewed By: sammy-SC
Differential Revision: D56621407
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 19,460,147 | +44 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 22,833,652 | +30 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: be06fd4e22a500128d202436600381b8bc17b3f5 Branch: main
Merged as https://github.com/facebook/react-native/commit/34331af9cea59595c903f2f95896037ab1b22b16