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
Remove inlining logic in AST (de-)serializer #5455
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#no-inlined-attributes Notice: Ensure you have installed Rust nightly. If you haven't installed it yet, please first see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust, then see https://rust-lang.github.io/rustup/concepts/channels.html to learn how to install Rust nightly. or load it into the REPL: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5455 +/- ##
=======================================
Coverage 98.79% 98.79%
=======================================
Files 238 238
Lines 9446 9450 +4
Branches 2403 2407 +4
=======================================
+ Hits 9332 9336 +4
Misses 48 48
Partials 66 66 ☔ View full report in Codecov by Sentry. |
This PR has been released as part of rollup@4.14.1. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
One outcome of a workshop I recently held was that especially the inlining logic was adding a massive amount of complexity to the AST serializer, especially on the Rust side. This made it much harder for new contributors to understand the process. As I only expect moderate gains from this optimization, I decided to remove it instead. This will become even more relevant when we add string deduplication as that implies that then, strings can never be inlined, so there will only be a few candidates left for inlining.
As another optimization, however, I added logic to list serialization that for an empty list, we can set the position to 0 instead of pointing to a separate list location containing the 0 for its length.