GraphViz Dot very long duration of generation
Asked Answered
S

3

12

I have a tree structure I want to be generated by Dot. Each node has 4 edges to another 4 nodes. In sum there are about 1,000 nodes. If I try to generate it with Dot it takes a very long time (once I let it work like for a hour - CPU usage was 100% all the time but it didn't finish). Is there a way to accelerate this? Maybe by setting down the quality? Or using another (faster?) vizualization software? I've attached my Dot file for you to test it on your own machine.

Dot File: http://lh.rs/3fmsfjmbvRw2

Sentence answered 26/5, 2012 at 12:10 Comment(1)
I believe dot is the slowest of all the graphviz layout engines. Have you tried using any of the others? See roadmap @ graphviz.orgLeeuwarden
K
6

chk this link,laying out a large graph with graphviz

sfdp -x -Goverlap=scale -Tpng data.dot > data.png

Karney answered 30/9, 2014 at 8:19 Comment(1)
The overlap=scale is the only option solving the issue in very large graphs for me :) Thanks!Mudslinger
I
5

You may want to try setting the nslimit or nslimit1 attributes as mentioned here:

You may also tune the maxiter, mclimit and splines attributes, especially splines=line gave me a huge speedup (albeit being somewhat ugly).

Also, as E-man suggested, dot is really slower than e.g. circo or twopi, so you may consider using one of those, if they look OK for your graph.

Imphal answered 16/9, 2013 at 14:55 Comment(0)
M
1

Importing a large .dot file into Gephi - https://gephi.org is really fast.

Mclendon answered 26/3, 2019 at 17:42 Comment(3)
I tried to open a large .dot file in gephi, but it is empty. Any chance you can point me to an example?Coaction
Hi @Patrick, unfortunately I haven't done much work with it myself and don't have any example files. It's possible your dot file is too complex. The Gephi site (unfortunately) mentions: "Gephi currently doesn’t provide a complete support of the DOT format. Subgraphs are not supported, nor custom attributes or size. Only labels and colors are imported if present. Directed and undirected graphs are supported." - gephi.org/users/supported-graph-formats/graphviz-dot-formatMclendon
Thanks Jim. I think my DOT format does have sub-graph so Gephi is not working for it.Coaction

© 2022 - 2024 — McMap. All rights reserved.