Repository navigation
Conversation
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126630163. |
javache
force-pushed
the
export-D126630163
branch
from
October 22, 2026 13:22
fa0e3ad to
55f35ac
Compare
javache
added a commit
to javache/react-native
that referenced
this pull request
Oct 22, 2026
Summary: Pull Request resolved: react#59296 Add the default-off `skipNativePropsForViewManagerWithDelegateAndroid` feature flag. When enabled, `ViewManager.getNativeProps()` returns an empty map for managers with a non-null, non-generic delegate, avoiding unused manager and shadow-node prop metadata generation. Return a fresh mutable map so subclasses can safely extend `super.getNativeProps()`. The constants helper already omits `NativeProps` for an empty map; commands, events and custom constants are preserved. Null and generic delegates keep the existing metadata path, including its legacy-architecture shadow-node handling. The flag must only be enabled when delegate-backed components use static view configs rather than runtime native prop metadata. NativeProps queries reuse `getOrCreateViewManagerDelegate()`, sharing the same delegate with prop updates and commands. Make its lazy initialisation thread-safe with a volatile cache and double-checked synchronisation, leaving warm reads lock-free. Document that initialisation may occur on the JavaScript thread when this flag is enabled. Regenerate all feature-flag bindings and cover enabled/disabled paths, generic and null delegates, marker-only managers, preserved constants, subclass prop extensions, independent mutable maps, existing-cache reuse and concurrent metadata/command initialisation. Changelog: [Android][Changed] - Add an opt-in optimisation to skip native prop metadata for delegate-backed view managers using static view configs. Differential Revision: D126630163
Summary: Add the default-off `skipNativePropsForViewManagerWithDelegateAndroid` feature flag. When enabled, `ViewManager.getNativeProps()` returns an empty map for managers with a non-null, non-generic delegate, avoiding unused manager and shadow-node prop metadata generation. Return a fresh mutable map so subclasses can safely extend `super.getNativeProps()`. The constants helper already omits `NativeProps` for an empty map; commands, events and custom constants are preserved. Null and generic delegates keep the existing metadata path, including its legacy-architecture shadow-node handling. The flag must only be enabled when delegate-backed components use static view configs rather than runtime native prop metadata. NativeProps queries reuse `getOrCreateViewManagerDelegate()`, sharing the same delegate with prop updates and commands. Make its lazy initialisation thread-safe with a volatile cache and double-checked synchronisation, leaving warm reads lock-free. Document that initialisation may occur on the JavaScript thread when this flag is enabled. Regenerate all feature-flag bindings and cover enabled/disabled paths, generic and null delegates, marker-only managers, preserved constants, subclass prop extensions, independent mutable maps, existing-cache reuse and concurrent metadata/command initialisation. Changelog: [Android][Changed] - Add an opt-in optimisation to skip native prop metadata for delegate-backed view managers using static view configs. Reviewed By: andrewdacenko Differential Revision: D126630163
javache
force-pushed
the
export-D126630163
branch
from
October 28, 2026 09:45
55f35ac to
8639725
Compare
This branch has not been deployed
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:
Add the default-off
skipNativePropsForViewManagerWithDelegateAndroidfeature flag. When enabled,ViewManager.getNativeProps()returns an empty map for managers with a non-null, non-generic delegate, avoiding unused manager and shadow-node prop metadata generation. Return a fresh mutable map so subclasses can safely extendsuper.getNativeProps(). The constants helper already omitsNativePropsfor an empty map; commands, events and custom constants are preserved.Null and generic delegates keep the existing metadata path, including its legacy-architecture shadow-node handling. The flag must only be enabled when delegate-backed components use static view configs rather than runtime native prop metadata.
NativeProps queries reuse
getOrCreateViewManagerDelegate(), sharing the same delegate with prop updates and commands. Make its lazy initialisation thread-safe with a volatile cache and double-checked synchronisation, leaving warm reads lock-free. Document that initialisation may occur on the JavaScript thread when this flag is enabled.Regenerate all feature-flag bindings and cover enabled/disabled paths, generic and null delegates, marker-only managers, preserved constants, subclass prop extensions, independent mutable maps, existing-cache reuse and concurrent metadata/command initialisation.
Changelog:
[Android][Changed] - Add an opt-in optimisation to skip native prop metadata for delegate-backed view managers using static view configs.
Reviewed By: andrewdacenko
Differential Revision: D126630163