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

Speed up the plugin with oxc-parser #52

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

sai-cb
Copy link

@sai-cb sai-cb commented Nov 28, 2024

OXC is a new exciting project from the same team behind Vite:

https://oxc.rs/

To our testing their parser is easily 2x faster than acorn. This can be a sizeable performance improvement in this plugin.

We have tested this change on a large codebase without apparent hiccups.

@sai-cb sai-cb marked this pull request as ready for review November 28, 2024 13:38
@cyco130
Copy link
Owner

cyco130 commented Nov 30, 2024

Thank you for your contribution, this is great!

On my microbenchmarks, oxc-parser indeed performs 3x better than acorn 🎉

But this is a fairly important change for a package with a lot of dependents. I would like to do some more testing in real-world settings.

In the meantime, I've released it under vite-plugin-cjs-interop@2.2.0-oxc.0 (install with npm i vite-plugin-cjs-interop@oxc) so the community can start testing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants