perf: mdx build time - #62
Draft
MohamedH1998 wants to merge 4 commits into
Draft
Conversation
commit: |
Collaborator
Author
|
CI shows no measurable change: this branch built in 367s vs 365/374s on unrelated PRs (within noise). cf-docs's build is bound by bundling + rendering, not the MDX compile these changes touch - so skipping/caching that work is a rounding error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome: closed experiment — no measurable win
Build-time perf experiment for large sites (measured on Cloudflare Docs, ~8.7k
pages). All framework-only (
packages/nimbus-docs). Conclusion: correct and safe,but no measurable build-time win on the current stack — not shipping.
Two MDX-compile changes were tried here:
mergePartialHeadingsonly injects headings from
<Render>slots, so a body without one is a purepass-through; the
mdxToMdastparse is skipped for it (byte-identical output,~4,900 of ~6,700 cf-docs pages).
mdxCacheoption, default off) — diskcache around the
@mdx-js/rolldowntransform; a hit skips the compile.A CI/A-B check showed no measurable change: this branch built in 367s vs 365/374s on
unrelated PRs (within noise). cf-docs's build is bound by bundling + rendering, not
the MDX compile these changes touch, so skipping/caching that work is a rounding
error. Same story as the sibling prerender-hashing experiment (#57), whose original
win also evaporated once Rolldown sped up its chunk hashing.
Disposition: closing unmerged. The two changesets on this branch never reach
main, so there's no release impact. Kept here as a documented negative result.