GraphViz Dot 生成的持续时间很长 [英] GraphViz Dot very long duration of generation

查看:32
本文介绍了GraphViz Dot 生成的持续时间很长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个想要由 Dot 生成的树结构.每个节点有 4 条边到另外 4 个节点.总之,大约有 1,000 个节点.如果我尝试用 Dot 生成它需要很长时间(一旦我让它工作了一个小时 - CPU 使用率一直是 100% 但它没有完成).有没有办法加速这个?也许通过降低质量?或者使用另一个(更快?)可视化软件?我已附上我的 Dot 文件,供您在自己的机器上进行测试.

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.

谢谢.点文件:http://lh.rs/3fmsfjmbvRw2

推荐答案

您可能想尝试设置 nslimit 或 nslimit1 属性,如下所述:

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)

您还可以调整 maxitermclimitsplines 属性,尤其是 splines=line 给了我一个巨大的加速(虽然有点难看).

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

此外,正如 E-man 所建议的,dot 确实比 e.g. 慢.circo 或 twopi,因此您可以考虑使用其中之一,如果它们适合您的图表.

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.

这篇关于GraphViz Dot 生成的持续时间很长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆