Skip to content

Move View.js prop transformations to C++ prop parsing#55853

Closed
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D94219577
Closed

Move View.js prop transformations to C++ prop parsing#55853
sammy-SC wants to merge 1 commit intofacebook:mainfrom
sammy-SC:export-D94219577

Conversation

@sammy-SC
Copy link
Copy Markdown
Contributor

@sammy-SC sammy-SC commented Mar 2, 2026

Summary:
Changelog: [Internal]

View.js previously transformed aria-* props to accessibility* equivalents, id to nativeID, and tabIndex to focusable in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (AccessibilityProps::setProp, Props::setProp, and HostPlatformViewProps::setProp), making the JS wrapper thinner and faster.

Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | -18% |

This change is gated for safe rollout.

Differential Revision: D94219577

@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 Mar 2, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 2, 2026

@sammy-SC has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94219577.

sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 3, 2026
Summary:

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |


This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 3, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
@sammy-SC sammy-SC force-pushed the export-D94219577 branch 2 times, most recently from cc2da2f to f3241ce Compare March 3, 2026 15:17
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 3, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 3, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
@sammy-SC sammy-SC force-pushed the export-D94219577 branch 2 times, most recently from 37b9c1a to 962452e Compare March 4, 2026 09:59
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 4, 2026
Summary:

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |


This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: NickGerleman

Differential Revision: D94219577
Summary:

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |


This change is gated for safe rollout.

Reviewed By: javache, NickGerleman

Differential Revision: D94219577
@meta-codesync meta-codesync bot closed this in 7f7dbe7 Mar 4, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 4, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 4, 2026

This pull request has been merged in 7f7dbe7.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @sammy-SC in 7f7dbe7

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

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: facebook#55853

Changelog: [Internal]

`View.js` previously transformed `aria-*` props to `accessibility*` equivalents, `id` to `nativeID`, and `tabIndex` to `focusable` in JavaScript before passing to the native component. This diff moves all those transformations to the C++ prop parsing layer (`AccessibilityProps::setProp`, `Props::setProp`, and `HostPlatformViewProps::setProp`), making the JS wrapper thinner and faster.

## Benchmark Results (View vs ViewNativeComponent)

| Component | Before (median ns) | After (median ns) | Change |
| View | 666,750 | 546,917 | **-18%** |

This change is gated for safe rollout.

Reviewed By: javache, NickGerleman

Differential Revision: D94219577

fbshipit-source-id: 6dee071a2a8caea533dbedd21a2294aec38307f2
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants