Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Adopt react compiler? #809

Open
3 tasks
oliviertassinari opened this issue Nov 6, 2024 · 0 comments
Open
3 tasks

[core] Adopt react compiler? #809

oliviertassinari opened this issue Nov 6, 2024 · 0 comments
Labels
core Infrastructure work going on behind the scenes discussion performance status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 6, 2024

Summary

Per https://youtu.be/qd5yk2gxbtg?t=1061&si=ZueAd7hJ3rvYQBod we might want to explore adopting the react compiler.

The main question is does this even make sense? I suspect that we need to cherry-pick the optimizations that help and opt out of the harmful ones (extra bundle size, wasted CPU cycles, extra memory), using some sort of test app. Because we are almost exclusively leaf components, maybe this could be mostly harmful, not having much in the render tree that is pruned.

Another blocker is the overall community interest in this, which seems low: https://npm-stat.com/charts.html?package=babel-plugin-react-compiler&package=eslint-plugin-react-compiler for now.

The action plan would involve:

  • Lint the codebase with eslint-plugin-react-compiler.
  • Run all the tests on the output of the compiler. I believe we already do this with the Babel optimizations that we have, so won't be too hard. It's important to guarantee behavior.
  • Publish the source with the output of the compiler.

Examples

Motivation

Performance.

Search keywords: -

@oliviertassinari oliviertassinari added status: waiting for maintainer These issues haven't been looked at yet by a maintainer core Infrastructure work going on behind the scenes labels Nov 6, 2024
@zannager zannager assigned DiegoAndai and unassigned DiegoAndai Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes discussion performance status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants