mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
40115d87d4
Summary: ## Context Every time we require a NativeModule in Java, we [first try to create it with the TurboModuleManager](https://fburl.com/diffusion/3nkjwea2). In the TurboModule infra, when a NativeModule is requested, [we first create it](https://fburl.com/diffusion/d2c6iout), then [if it's not a TurboModule, we discard the newly created object](https://fburl.com/diffusion/44gjlo6y). This is extremely wasteful, especially when a NativeModule is requested frequently and periodically, like UIManagerModule. Therefore, in D24811838 (https://github.com/facebook/react-native/commit/803a26cb003e6b790e3a1ab31beb0c95795fff0c) fkgozali launched a fix to the infra that would avoid creating the non-TurboModule object in the first place. Today, we're launching this optimization. Reviewed By: fkgozali Differential Revision: D25621570 fbshipit-source-id: dedba4d5ac6fcf2ec3c31e7163a6a226065c708b