You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML viz hard-refuses at >5000 nodes without WebGL fallback or aggregated view #447
Graph has 8333 nodes - too large for HTML viz. Use Obsidian vault instead.
and skips graph.html generation entirely. No fallback is offered beyond Obsidian (which requires a separate app) or the markdown wiki.
Why this matters
The wiki is useful but is agent-oriented; for human exploration the interactive HTML graph is the primary artefact. Hitting the 5K ceiling on a mid-sized codebase (≤500 files) means visualisation is unavailable in exactly the situation where a knowledge graph is most valuable.
Root cause
The ceiling appears to be hard-coded against vis.js DOM performance:
ifG.number_of_nodes() >5000:
print(f'Graph has {G.number_of_nodes()} nodes - too large for HTML viz.')
vis.js degrades past ~3–5K DOM nodes. But this is a renderer choice, not an inherent graph limit.
Proposed fixes
Ranked by effort:
Aggregated view (cheapest): when above ceiling, emit an HTML that collapses each community to a meta-node, edges weighted by inter-community edge count. Click to expand into member nodes. Keeps vis.js.
WebGL renderer option: sigma.js or Cosmograph handle 50K+ nodes at 60fps. Ship as --renderer webgl flag.
Explicit override: --force-html for users who accept slow render.
Even #1 alone (aggregated view as default above ceiling) would eliminate the "no viz" outcome for mid-sized graphs.
Repro
410 files → 8333 nodes → HTML refused.
5K ceiling is approximately 250-300 mid-complexity Python files.
Fixed in v0.4.31: graphs with >5000 nodes now render an aggregated community meta-graph (one node per community, edge weights = cross-community edge count) instead of hard-refusing. This keeps the HTML visualization useful at any scale.
Activity
Harsh-Codes-77 commentedon Apr 21, 2026
I'd like to work on this
safishamsi commentedon Apr 22, 2026
Fixed in v0.4.31: graphs with >5000 nodes now render an aggregated community meta-graph (one node per community, edge weights = cross-community edge count) instead of hard-refusing. This keeps the HTML visualization useful at any scale.