Skip to content

Do not eagerly allocate all view managers in DefaultReactNativeHost#42869

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D53406841
Closed

Do not eagerly allocate all view managers in DefaultReactNativeHost#42869
javache wants to merge 1 commit into
react:mainfrom
javache:export-D53406841

Conversation

@javache

@javache javache commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

Summary:
DefaultReactNativeHost builds a ViewManagerRegistry based on a list of ViewManagers, which is inefficient, as we have to allocate them all ahead of time (defeating the purpose of ViewManagerOnDemandReactPackage). Instead provide a ViewManagerResolverwhich lazily resolves them.

Changelog: [Internal]

Differential Revision: D53406841

@facebook-github-bot facebook-github-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 Feb 5, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@analysis-bot

analysis-bot commented Feb 5, 2024

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,237,470 +8
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,604,284 -2
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: d66d651
Branch: main

…acebook#42869)

Summary:

`DefaultReactNativeHost` builds a `ViewManagerRegistry` based on a list of ViewManagers, which is inefficient, as we have to allocate them all ahead of time (defeating the purpose of `ViewManagerOnDemandReactPackage`). Instead provide a `ViewManagerResolver`which lazily resolves them.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D53406841
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 5, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in f3977af.

@javache javache deleted the export-D53406841 branch March 4, 2024 13:36
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