Each time we do another module graph traversal, we throw away any record of files that might've been visited already from a previous traversal. This means we also allocate a new list of visited records each time, resulting in an initially empty array that must grow repeatedly which causes reallocations. With this PR, the space for storing the traversed module record paths is reused between traversals so it only uses as much space as the single largest traversal, instead of being based on the total number of traversals. So, we have much fewer reallocations. Running on `vscode`: Metric | Before | After | Reduction -- | -- | -- | -- Allocation calls | 16,807,784 | 16,744,378 | -0.4% Reallocation calls | 92,751 | 66,763 | -28.0% Allocated bytes | 1,506,926,944 B | 1,360,327,228 B | -9.7% Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
⚓ Oxc
/oʊ ɛks siː/
The Oxidation Compiler is a collection of high-performance tools for JavaScript and TypeScript written in Rust.
Oxc is part of VoidZero's vision for a unified, high-performance toolchain for JavaScript. It powers Rolldown (Vite's bundler) and enables the next generation of ultra-fast development tools that work seamlessly together.
For more information, check out our website at oxc.rs.
* Oxidation is the chemical process that creates rust
🙋 Who's using Oxc?
Rolldown and Nuxt use Oxc for parsing. Rolldown also uses Oxc for transformation and minification. Nova, swc-node, and knip use oxc_resolver for module resolution. Preact, Shopify, ByteDance, and Shopee use oxlint for linting.
🔧 Lint or Format a Codebase
🧰 Build Tooling on Top of Oxc
- Parse JavaScript and TypeScript: Parser
- Transform TypeScript, JSX, and modern JavaScript: Transformer
- Minify JavaScript for production builds: Minifier
- Resolve modules for JavaScript and TypeScript: Resolver
✍️ Contribute
Check out some of the good first issues or ask us on Discord.
See CONTRIBUTING.md for guidance, or read the complete contributing guide on our website →
If you are unable to contribute by code, you can still participate by:
- Add a GitHub Star to the project
- Join us on Discord
- Follow me on X and post about this project
📚 Other Resources
Sponsored By
📖 License
Oxc is free and open-source software licensed under the MIT License.
Thank you to namespace.so for powering our CI/CD pipelines with fast, free macOS and Linux runners.
Oxc ports or copies code from other open source projects, their licenses are listed in Third-party library licenses.