BabylonReactNative
BabylonReactNative copied to clipboard
Main thread is blocked when rendering
trafficstars
See https://github.com/BabylonJS/BabylonReactNative/blob/b3716d9dd7538ecf56ae670a311fba5b0d4b90b8/Modules/%40babylonjs/react-native/shared/BabylonNative.cpp#L116-L119
The code is currently calling FinishRenderingCurrentFrame immediately following StartRenderingCurrentFrame. FinishedRenderingCurrentFrame will immediately block waiting for the JS thread to finish doing its part. Ideally, these calls should be backwards. StartRenderingCurrentFrame should be called as soon as possible and FinishRenderingCurrentFrame should be called as late as possible. There should be a small gap between FinishRenderingCurrentFrame and the next StartRenderingCurrentFrame.