问题
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.
Thank you. Dot File: http://lh.rs/3fmsfjmbvRw2
回答1:
You may want to try setting the nslimit or nslimit1 attributes as mentioned here:
- https://web.archive.org/web/20170421065851/http://www.graphviz.org:80/content/dot-performance-issues
- https://graphviz.org/doc/info/attrs.html#d:nslimit (or the original: https://web.archive.org/web/20170421065851/http://www.graphviz.org:80/content/attrs#dnslimit)
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.
回答2:
chk this link,laying out a large graph with graphviz
sfdp -x -Goverlap=scale -Tpng data.dot > data.png
回答3:
Importing a large .dot file into Gephi - https://gephi.org is really fast.
来源:https://stackoverflow.com/questions/10766100/graphviz-dot-very-long-duration-of-generation