Skip to content

Extract applySynchronousUpdates from performOperations#9078

Merged
bartlomiejbloniarz merged 1 commit into
mainfrom
@bartlomiejbloniarz/extract-apply-synchronous-updates
Mar 11, 2026
Merged

Extract applySynchronousUpdates from performOperations#9078
bartlomiejbloniarz merged 1 commit into
mainfrom
@bartlomiejbloniarz/extract-apply-synchronous-updates

Conversation

@bartlomiejbloniarz

@bartlomiejbloniarz bartlomiejbloniarz commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Separates the synchronous UI props update logic into its own applySynchronousUpdates method.

Adds partitionUpdates and shouldUseSynchronousUpdatesInPerformOperations helpers to support the extracted method.

Test plan

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts the synchronous UI props update logic from the performOperations method into a dedicated applySynchronousUpdates method. It also introduces two helper functions: shouldUseSynchronousUpdatesInPerformOperations (compile-time feature flag check) and partitionUpdates (splits props into synchronous and shadow tree batches).

Changes:

  • Added shouldUseSynchronousUpdatesInPerformOperations() as a constexpr function in an anonymous namespace, consolidating the platform-specific feature flag checks that were previously inline if constexpr blocks.
  • Added partitionUpdates() to separate update batches into synchronous and shadow tree props, replacing the inline partitioning logic that previously existed in both Android and iOS codepaths.
  • Extracted the Android and iOS synchronous update application logic into the new applySynchronousUpdates member method.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ReanimatedModuleProxy.h Declares the new applySynchronousUpdates private method.
ReanimatedModuleProxy.cpp Adds shouldUseSynchronousUpdatesInPerformOperations, partitionUpdates helpers and applySynchronousUpdates method; refactors performOperations to use them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bartlomiejbloniarz bartlomiejbloniarz force-pushed the @bartlomiejbloniarz/extract-apply-synchronous-updates branch 2 times, most recently from ea4bdef to 8b85857 Compare March 10, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bartlomiejbloniarz bartlomiejbloniarz added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit d50dc84 Mar 11, 2026
25 checks passed
@bartlomiejbloniarz bartlomiejbloniarz deleted the @bartlomiejbloniarz/extract-apply-synchronous-updates branch March 11, 2026 13:03
bartlomiejbloniarz added a commit that referenced this pull request Mar 18, 2026
## Summary

Separates the synchronous UI props update logic into its own
`applySynchronousUpdates` method.

Adds `partitionUpdates` and
`shouldUseSynchronousUpdatesInPerformOperations` helpers to support the
extracted method.

## Test plan
bartlomiejbloniarz added a commit that referenced this pull request Mar 18, 2026
## Summary

Separates the synchronous UI props update logic into its own
`applySynchronousUpdates` method.

Adds `partitionUpdates` and
`shouldUseSynchronousUpdatesInPerformOperations` helpers to support the
extracted method.

## Test plan
bartlomiejbloniarz added a commit that referenced this pull request Mar 18, 2026
Separates the synchronous UI props update logic into its own
`applySynchronousUpdates` method.

Adds `partitionUpdates` and
`shouldUseSynchronousUpdatesInPerformOperations` helpers to support the
extracted method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants