facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.24k stars 626 forks source link

Exclude React Compiler runtime from inline requires #1390

Closed gaearon closed 4 days ago

gaearon commented 4 days ago

Summary

Similar to https://github.com/facebook/metro/pull/1126. This call is in every component on every render and it is not beneficial to inline it. On the contrary, you want to reduce the indirection there.

Changelog: [Performance] Exclude React Compiler runtime from inline requires

Changelog:

Test plan

Before:

Screenshot 2024-11-17 at 18 01 25

After:

Screenshot 2024-11-17 at 18 08 05
gaearon commented 4 days ago

cc @robhogan

gaearon commented 4 days ago

also cc @poteto fyi

facebook-github-bot commented 4 days ago

@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

robhogan commented 4 days ago

Thanks Dan!

facebook-github-bot commented 4 days ago

@robhogan merged this pull request in facebook/metro@b371180b0f1b61368e4e85461e929c4548140a7c.