Skip to content

Conversation

javache
Copy link
Member

@javache javache commented Jul 15, 2025

Summary:
We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Differential Revision: D78340288

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78340288

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78340288

javache added a commit to javache/react-native that referenced this pull request Jul 15, 2025
…52611)

Summary:
Pull Request resolved: facebook#52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Differential Revision: D78340288
@javache javache force-pushed the export-D78340288 branch from 4a4086a to 4b5a47e Compare July 15, 2025 15:22
…52611)

Summary:
Pull Request resolved: facebook#52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78340288
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78340288

@javache javache force-pushed the export-D78340288 branch from 4b5a47e to ca92aeb Compare July 16, 2025 11:37
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 16, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5d3d23b.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @javache in 5d3d23b

When will my fix make it into a release? | How to file a pick request?

kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
…52611)

Summary:
Pull Request resolved: facebook#52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78340288

fbshipit-source-id: f44a054e234694c316fb080fe2dbc2017780123a
cortinico pushed a commit that referenced this pull request Sep 2, 2025
Summary:
Pull Request resolved: #52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78340288

fbshipit-source-id: f44a054e234694c316fb080fe2dbc2017780123a
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @javache in 1b5c183

When will my fix make it into a release? | How to file a pick request?

gabrieldonadel pushed a commit that referenced this pull request Sep 9, 2025
…eNativeTransformHelperAndroid` in the experimental channel (#53567)

* Use native implementation of equals in ReadableNativeArray (#52611)

Summary:
Pull Request resolved: #52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78340288

fbshipit-source-id: f44a054e234694c316fb080fe2dbc2017780123a

* Use native helpers to accelerate transform processing (#52603)

Summary:
Pull Request resolved: #52603

Processing transforms is expensive in Java, as it requires bridging the entire ReadableNativeArray/Map. Instead, we can use the existing parser logic `resolveTransform` logic to perform this operation in C++.

Ideally, we actually re-use the existing parsed transform from Props, that could be something we revisit after Props 2.0.

As a follow-up, we should consider also moving the matrix decomposition logic from MatrixMathHelper here, and make that the only information we send back to Java.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78298588

fbshipit-source-id: a698ac8587ccfb2be04665747082398ccdde9294

* Add TransformHelper.cpp to `reactnativejni_common` (#52640)

Summary:
Pull Request resolved: #52640

Not having `TransformHelper.cpp` included in CMake is causing the C++ code to fail compiling.
This diff fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, javache

Differential Revision: D78414015

fbshipit-source-id: 4900427a86eb38bfec10e5e385296d89c73e9051

* [LOCAL] Unbreak compilation due to CMake dependencies

---------

Co-authored-by: Pieter De Baets <pieterdb@meta.com>
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cortinico in a346096

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants