Skip to content

Comments

[WIP] Introduce xmdx#13274

Draft
jp-knj wants to merge 3 commits intowithastro:mainfrom
jp-knj:feat/astrojs-mdx-to-xmdx
Draft

[WIP] Introduce xmdx#13274
jp-knj wants to merge 3 commits intowithastro:mainfrom
jp-knj:feat/astrojs-mdx-to-xmdx

Conversation

@jp-knj
Copy link
Member

@jp-knj jp-knj commented Feb 17, 2026

Summary

Introduced astro-xmdx for MDX compilation.

Changes

  • Adds astro-xmdx path to @astrojs/mdx
  • Keeps compatibility by preserving current behavior/fallback path where needed
  • Adds benchmark methodology + results (fair vs max-performance) for review

Benchmark Setup (WIP)

Item Value
Corpus withastro/docs@5f58d09
Docs dir /tmp/xmdx-bench-official/src/content/docs
Pattern **/*.{md,mdx}
Warmup / Runs 5 / 10
Node v22.21.1
Platform darwin arm64
CPU Apple M2

Results

(Lower is better)

Dataset Files Size (KB) mdxjs xmdx speedup
small 794 507.3 241.21 ms 55.90 ms 4.31x
medium 794 2261.7 924.22 ms 271.71 ms 3.40x
large 819 12247.0 4958.02 ms 1398.20 ms 3.55x
full-all 2407 15015.9 6405.87 ms 1722.59 ms 3.72x

Profiling Notes

  • JS CPU profiling indicates @mdx-js/mdx time is concentrated in micromark / mdast-util-from-markdown
    stack.
  • xmdx time is mostly inside native compile entry (Rust-side internals not fully visible in V8 cpuprofile).

CI Benchmark (withastro/docs full build)

From jp-knj/xmdx#25:

Command Mean [s] Min [s] Max [s] Relative
@astrojs/mdx 383.694 ± 4.463 378.624 387.032 1.17 ± 0.04
astro-xmdx 328.865 ± 10.096 321.346 340.339 1.00

Notes for reviewers

  • Numbers are corpus- and environment-specific.
  • Median-based comparison is used for stability.
  • This PR’s goal is to validate astro-xmdx integration viability and performance impact in @astrojs/mdx.

@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit de1b9db
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/699aadbc9cdae900083a615c
😎 Deploy Preview https://deploy-preview-13274--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Feb 17, 2026
@astrobot-houston
Copy link
Contributor

astrobot-houston commented Feb 17, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
es/recipes/making-toolbar-apps.mdx Localization changed, will be marked as complete.
ja/guides/testing.mdx Localization changed, will be marked as complete.
ru/guides/testing.mdx Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@jp-knj jp-knj force-pushed the feat/astrojs-mdx-to-xmdx branch 10 times, most recently from bc7575e to 5f6706b Compare February 22, 2026 07:04
@jp-knj jp-knj force-pushed the feat/astrojs-mdx-to-xmdx branch from 5f6706b to 45771e8 Compare February 22, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants