dreampuf / GraphvizOnline

Let's Graphviz it online
https://dreampuf.github.io/GraphvizOnline/
BSD 3-Clause "New" or "Revised" License
799 stars 213 forks source link

support larger graphs #13

Open Trass3r opened 4 years ago

Trass3r commented 4 years ago

abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216,
(2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations,
(3) set Module.TOTAL_MEMORY to a higher value before the program runs,
or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ").
Build with -s ASSERTIONS=1 for more info.```
dreampuf commented 4 years ago

I tried to compile an ALLOW_MEMORY_GROWTH version. It showed conflict with the legendary WASM mode which is what vis.js does.

16MB is a quite small number as default. Maybe we can start with 64MB. Even more, expose an option to let the user choose.

stenbln commented 4 years ago

Any update on this? I would really like to use this tool but my use case are really big graphs..

dreampuf commented 4 years ago

@stenbln could you please provide some examples? A gist would be great.

stenbln commented 4 years ago

this is the base gist that I am using - https://dreampuf.github.io/GraphvizOnline/#digraph%20G%20%7B%0A%0A%20%20subgraph%20cluster_0%20%7B%0A%20%20%20%20style%3Dfilled%3B%0A%20%20%20%20color%3Dlightgrey%3B%0A%20%20%20%20node%20%5Bstyle%3Dfilled%2Ccolor%3Dwhite%5D%3B%0Abase_featureFT-%3E%0Ameta_featureFT-%3E%0Amap_featureFT%0A%0A%0A%20%5Barrowhead%3Dnone%2C%20style%3Ddashed%2C%20color%3Dgray%5D%3B%0A%20%20%20%20label%20%3D%20%22FT%22%3B%0A%20%20%7D%0A%0A%20%20subgraph%20cluster_1%20%7B%0A%20%20%20%20node%20%5Bstyle%3Dfilled%5D%3B%0A%0AlayerPT-%3E%0AcroppingPT-%3E%0AnamesstructPT%0A%20%5Barrowhead%3Dnone%2C%20style%3Ddashed%2C%20color%3Dgray%5D%3B%0A%20%20%20%20label%20%3D%20%22PT%22%3B%0A%20%20%20%20color%3Dblue%0A%20%20%7D%0Abase_featureFT-%3ElayerPT%3B%0Abase_featureFT-%3EcroppingPT%3B%0Ameta_featureFT-%3EnamesstructPT%3B%0A%0A%20%0A%7D

Then If I add around 1000 more nodes in the left subgraph and around 1000 nodes in the right subgraph, when I connect each of the nodes from the left subgraph to at least one (or more) nodes in the right subgraph, i get the same out of memory exception.

danielo515 commented 3 years ago

I am on a similar situation. I really want to visualize my graphs on a nicer way than raw SVG, but they are quite big too

JerryChin commented 8 months ago

I have a workaround, specify TOTAL_MEMORY at full.render.js

Example:

  Module = Module || {};
  Module.TOTAL_MEMORY = 1024 * 1024 * 1024;  // Allow 1GB