graphify export CLI hard-caps at 512 MB graph.json #1019
-
|
I'm hitting this error on a large C codebase (~49k files): ERROR: graph file graphify-out/graph.json is 624_595_520 bytes, Final graph: 518,749 nodes / 1,283,722 edges / 22,565 communities built via /graphify (AST + Haiku 4.5 semantic pass on a scoped subset). The 624 MB graph.json written by to_json() is correct and complete — the cap is in the CLI loader, not in the data. Workaround that worked: dropping to the Python API, calling graphify.export.to_html(G, communities, "graph.html", node_limit=5000, ...) directly produces a usable 6.5 MB aggregated community-meta-graph HTML without ever re-reading graph.json. Probable solutions:
Versions: graphify installed today (uv tool install graphifyy), Python 3.13, macOS arm64. I am happy to open a PR, but it would be good to hear from the community first, which solution(s) is/are better? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Also encountering the same. |
Beta Was this translation helpful? Give feedback.
-
|
Fixed in HEAD — all three solutions you proposed are implemented, shipping in the next release. Solution 1 — GRAPHIFY_MAX_GRAPH_BYTES env var GRAPHIFY_MAX_GRAPH_BYTES=700MB graphify query "..."
GRAPHIFY_MAX_GRAPH_BYTES=2GB graphify html
GRAPHIFY_MAX_GRAPH_BYTES=671088640 # plain bytes also acceptedAccepts plain bytes, Solution 2 — Better error message Solution 3 — Auto-fallback for graphify html Other export formats (obsidian, wiki, svg, graphml, neo4j) still error so you know to set the env var for those. All three solutions pass smoke tests. Thank you for the detailed root-cause analysis and the clean solution proposals. |
Beta Was this translation helpful? Give feedback.
Fixed in HEAD — all three solutions you proposed are implemented, shipping in the next release.
Solution 1 — GRAPHIFY_MAX_GRAPH_BYTES env var
Accepts plain bytes,
<N>MB, or<N>GB(1024-based). Read fresh on every size check, so it can be set in your shell profile, CI env, or .env.Solution 2 — Better error message
The cap error now tells you exactly what to set: