-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve performance by switching from babel
#69
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
To be clear, the parser is only a part of the problem. If we will switch to SWC as a parser we will gain almost nothing:
To get real benefits, we should move the most of processing to Rust, change approaches and preferably use Deno or another runtime JS runtime to eval code. And it's a complete rewrite 😊 |
@layershifter Thanks for the explanations 👍🏻 Other than a complete rewrite, can other smaller effort changes improve things? I'm working on a huge project. Our vite build using @vitejs/plugin-react-swc takes ~2 minutes, but if I disable the linaria plugin and paths alias linaria with styled-components, the build time is just ~1.2 miniutes. Thats a big difference :( |
Right now, we are experimenting with Rust and oxc.rc, but I can't promise anything. |
A minor update: I managed to build a PoC on Rust, oxc and Deno. However, it is too early to talk about performance measurements since a minimal set of features is supported so far, and there is no caching at all. |
The cli version shows almost x10 performance boost. |
babel
to swc
babel
Describe the enhancement
Switch from
babel
toswc
.Motivation
Performance should be improved. It's extremely slow in development.
Possible implementations
https://swc.rs/docs/migrating-from-babel
Related Issues
The text was updated successfully, but these errors were encountered: