-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
PoC(WIP): add MDX AST Bridge Implementation for High-Performance Compilation #14181
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
Conversation
|
6f45091
to
0d5b690
Compare
CodSpeed Performance ReportMerging #14181 will not alter performanceComparing Summary
Footnotes |
5fe7fbb
to
99e1b64
Compare
15a90ad
to
41c4475
Compare
8b2a3de
to
7a6dba6
Compare
7a6dba6
to
fee1f5d
Compare
15bab68
to
7c6d19c
Compare
88e1069
to
9b30b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ignore this file and put it in a dist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! I'll remove this!
@@ -0,0 +1,316 @@ | |||
/* eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks a lot for the research! I don't think this should live in Astro, but rather in the upstream package. I'm fine with leaving the PR open if that allows you to do more testing or whatever, otherwise feel free to close it |
I agree with this, please make the |
Sorry, I'll close. |
No need to apologize, I just wanted to set the expectation there. Thanks for the work on this, I think that can be very powerful! |
Related PR: #14080, I'm planning to close this later,
Summary
This PR introduces an experimental Rust-based MDX compiler for Astro and maintain compatibility with existing remark and rehype plugins.
Key Features
Performance
Plugin Compatibility
User Experience
Implementation Details
Architecture
The implementation uses an "AST bridge" pattern that combines the best of both worlds:
This is achieved through the AST Bridge architecture where:
The performance gains are consistent and scalable, making it an excellent choice for projects that need both speed and plugin flexibility.
Configuration
Performance Metrics
The Rust-based MDX compiler with plugins delivers:
Average performance improvement: ~2.5-3.7x faster than the JavaScript compiler while maintaining full compatibility with all remark and rehype plugins.
Technical Considerations
Pros
Cons