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? #44336

Open
3 tasks
Tracked by #42381
oliviertassinari opened this issue Nov 6, 2024 · 3 comments
Open
3 tasks
Tracked by #42381

[core] Adopt react compiler? #44336

oliviertassinari opened this issue Nov 6, 2024 · 3 comments
Labels
core Infrastructure work going on behind the scenes discussion performance

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 6, 2024

Summary

Same as mui/base-ui#809.

The action plan would involve:

  • Close [core] Adopt eslint-plugin-react-compiler #42548
  • 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

Motivation

Performance.

Now, to be fair, we likely want to invest time into this for Base UI first, since in Material UI there should be barely anything to optimize (it should be almost only about style).

@oliviertassinari oliviertassinari added core Infrastructure work going on behind the scenes status: waiting for maintainer These issues haven't been looked at yet by a maintainer discussion labels Nov 6, 2024
@oliviertassinari oliviertassinari changed the title [core] Adopt react compiler [core] Adopt react compiler? Nov 6, 2024
@DiegoAndai DiegoAndai removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 7, 2024
@Janpot
Copy link
Member

Janpot commented Nov 8, 2024

Now, to be fair, we likely want to invest time into this for Base UI first, since in Material UI there should be barely anything to optimize (it should be almost only about style).

Future versions of the compiler will do jsx inlining and outlining which I think we could benefit from.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Nov 8, 2024

@Janpot It seems that we can't use inlining for the npm version: facebook/react#30867 (comment). It's for end-users. In https://youtu.be/qd5yk2gxbtg?t=861&si=zuNFXoGaxhW_i670 he says that they haven't seen clear performance benefits yet, Sebastian expands more on this in the PR.

Outlining is part of why I got the vib that it's not for UI libraries, the code diff example seems likely to slow things down.

But in any cases, time will tell, curious to explore this more.

@Janpot
Copy link
Member

Janpot commented Nov 8, 2024

Also came across this statement: https://youtu.be/qd5yk2gxbtg?si=UXflMBYjkDbudA2L&t=1061

Screenshot 2024-11-08 at 16 39 47

Doesn't really seemed based on real benchmarking yet though

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
Projects
None yet
Development

No branches or pull requests

3 participants