Skip to content

feat(core): support dump chunk graph as graphviz #10403

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

Merged
merged 11 commits into from
May 29, 2025
Merged

Conversation

hardfist
Copy link
Contributor

@hardfist hardfist commented May 19, 2025

Summary

dump chunk graph for better debugging experience, both bazel and golang supports generate dot graph for future analyze

introduce a new env RSPACK_QUERY to control whether generate dot file, when RSPACK_QUERY is setting, Rspack will generate dot file for specific sealing phase, we may support much complex query like bazel query in the future like

* RSPACK_QUERY=code_splitting
* RSPACK_QUERY=code_splitting,split_chunks
  • pre-ensureChunkCondition
    image

  • post-split-chunks
    image

Dot limitation

the dot ability is kind of limited which doesn't support dig deep into module_graph of a specific chunk, we may change to use https://js.cytoscape.org/ for better graph visualizer analyze in the future

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).:
    • It's an WIP internal debugging tools, so no plan to expose it in documentation

Copy link

netlify bot commented May 19, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit cc62c07
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6838185baf70ac0008da5b03

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label May 19, 2025
@hardfist hardfist force-pushed the yj/dump-chunk-graph branch from b3debdb to a8c2392 Compare May 19, 2025 09:13
Copy link

codspeed-hq bot commented May 19, 2025

CodSpeed Performance Report

Merging #10403 will not alter performance

Comparing yj/dump-chunk-graph (cc62c07) with main (bf49522)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 12 untouched benchmarks

@hardfist hardfist force-pushed the yj/dump-chunk-graph branch from a8c2392 to 1a1106c Compare May 19, 2025 13:51
@hardfist hardfist changed the title Yj/dump chunk graph chore: support dump chunk graph as graphviz May 19, 2025
@JSerFeng JSerFeng force-pushed the yj/dump-chunk-graph branch from 7d6d999 to 25cb85d Compare May 28, 2025 08:14
@hardfist hardfist force-pushed the yj/dump-chunk-graph branch from 25cb85d to 6fa2d24 Compare May 29, 2025 07:46
@hardfist hardfist marked this pull request as ready for review May 29, 2025 08:05
@hardfist hardfist requested a review from JSerFeng as a code owner May 29, 2025 08:05
@hardfist hardfist changed the title chore: support dump chunk graph as graphviz feat(core): support dump chunk graph as graphviz May 29, 2025
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label May 29, 2025
@hardfist hardfist enabled auto-merge (squash) May 29, 2025 08:40
@hardfist hardfist merged commit 0088e33 into main May 29, 2025
39 checks passed
@hardfist hardfist deleted the yj/dump-chunk-graph branch May 29, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants