feat(inspector): compact graph layout via Graphviz dot node allocation - #194
Closed
antfubot wants to merge 12 commits into
Closed
feat(inspector): compact graph layout via Graphviz dot node allocation#194antfubot wants to merge 12 commits into
antfubot wants to merge 12 commits into
Conversation
commit: |
…g-layout # Conflicts: # pnpm-lock.yaml
…tfubot/node-modules-inspector into feat/graph-compact-dag-layout # Conflicts: # pnpm-lock.yaml
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.
Description
Adapts the graph node allocation from npmgraph to render a more compact dependency graph.
Like npmgraph, the node positions are now allocated by Graphviz
dot(via@hpcc-js/wasm-graphviz), while keeping the existing interactive Vue renderer — the DOT document only carries node sizes and edges, and only the computed positions (jsonoutput) are read back:300pxmin-width is gone; rendered node sizes are measured from the DOM and passed to Graphviz (npmgraph'swidth=0 height=0trick), so each column is only as wide as its content. Link endpoints use per-node widths.dotcan take a few seconds on large graphs (~1s at 800 nodes, ~4s at 1500 in benchmarks), so the WASM engine runs off the main thread. The previous tidy-tree layout is kept as an instant provisional pass (and as the fallback if the layout fails), then positions refine in place whendotfinishes.splines=noneskips edge routing since only positions are consumed.Verification
pnpm test(88 passed),pnpm typecheck,pnpm lint@nuxt/devtoolsalpha incompatibility at dev-server startup, unrelated to this changeThis PR was created with the help of an agent.