mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d53fc8a3cd
Summary: In the current Fabric model, we compute layout during the commit phase on the caller thread synchronously. Even though, in general, it's by design the correct way to do it, there are cases where it's *not* a requirement. In such cases, it's more optimal to yield early and continue execution of the commit process on a different thread asynchronously. One of such cases potentially is `completeRoot` call. There we don't need to return anything and can resume JavaScript execution immediately. The performance implications of that are not clear but there is a hope that it can free up to ~100ms of JavaScript execution time which is currently spent waiting for layout calculation (and other aspects of the commit phase). This is an implementation in the core. The plan is to test that on iOS first and then, in case if the results of the experiment are positive, to implement it on Android as well. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D22743723 fbshipit-source-id: 846a13152c5a419de0eaef0e6283ea4277c907dc