mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46346 Noticed that we could sometimes have multiple instances of DispatchUIFrameCallback in a single frame, which would cause us to execute more view preallocations or other work scheduled by Fabric. Root cause for this is on the new architecture, onHostResume seems to be invoked multiple times. Make this code more resilient by explicitly tracking the state of the frame callback and avoiding multiple subscriptions. Longer-term we should consider having ReactChoreographer support repeating FrameCallbacks, since most of them are. Changelog: [Android][Fixed] Fixed multiple Fabric dispatch callbacks being executed in a single Android frame Reviewed By: sammy-SC Differential Revision: D62213721 fbshipit-source-id: ac6fa5483ea38d9a15824af233fd23f1f6f3c891