microsoft / microsoft/react-native-windows
[Perf] Perform style.transform aggregation in native code
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
React Native has two different code paths for converting the style.transform property into a matrix that is then applied to a native view.
On iOS and Android, the processTransform function short-circuits. The transform property is passed down as-is to the native layer, offloading the matrix multiplication math to native code within the View implementation.
On other platforms (here, Windows), the JS function instead does this work directly.
I suggest changing RNW to match iOS and Android. Animations often use and update transforms frequently, so this could provide a performance boost.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing Libraries/StyleSheet/processTransform.js with the Windows native View implementation referenced in the issue, focusing on where transform values are currently converted into a matrix. Trace the Windows path from the style property to the native view and identify the existing transform behavior. Done means Windows follows the native aggregation path without changing the resulting transforms, with relevant behavior or performance checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript, react-native
- Domain
- desktop, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100