Do not flush Animated operation queue on mount for some feature flags#51461
Closed
rozele wants to merge 2 commits into
Closed
Do not flush Animated operation queue on mount for some feature flags#51461rozele wants to merge 2 commits into
rozele wants to merge 2 commits into
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75003751 |
…dSignalBatch (facebook#51459) Summary: When using `animatedShouldSignalBatch` in combination with `animatedShouldUseSingleOp`, we were seeing an issue where the queue is not flushed deterministically. It would be flushed in an ad-hoc manner by `createAnimatedPropsHook.js`, but this was only if a mount happened to occur in the same frame. Adding a deterministic queue flush mechanism to the logic handling `animatedShouldUseSingleOp` appears to resolve the issue. ## Changelog [Internal] Reviewed By: javache Differential Revision: D75002657
…facebook#51461) Summary: We are trying to minimize the amount of non-determinism in flushing Animated operation queues. Initially the `ReactNativeFeatureFlags.animatedShouldSignalBatch` handled non-determinism on the native side, eliminating the use of native mount hooks to trigger operation batch flushes in the native module. However, there is additional non-determinism introduced by JS, where the set of pending Animated operations may be flushed as a result of an effect. This change eliminates the flushing of Animated operations in the `useEffect` for `createAnimatedPropsHook.js`. ## Changelog [Internal] Reviewed By: yungsters, zeyap Differential Revision: D75003751
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D75003751 |
Contributor
|
This pull request has been merged in 2f761ee. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
We are trying to minimize the amount of non-determinism in flushing Animated operation queues. Initiallly the
ReactNativeFeatureFlags.animatedShouldSignalBatchhandled non-determinism on the native side, eliminating the use of native mount hooks to trigger operation batch flushes in the native module. However, there is additional non-determinism introduced by JS, where the set of pending Animated operations may be flushed as a result of an effect.This change eliminates the flushing of Animated operations in the
useEffectforcreateAnimatedPropsHook.js.Changelog
[Internal]
Differential Revision: D75003751