The graph layout algorithm is not very fast, particularly if the
revision graph is big. In my test case this saves about 10s.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch.
---
cs-bisection-step | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/cs-bisection-step b/cs-bisection-step
index 027032a1..8544bac0 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -1113,10 +1113,15 @@ END
or die "$!";
if (eval {
+ print DEBUG "RUNNING dot -Txdot\n";
+ system_checked("dot", "-Txdot", "-o$graphfile.xdot",
+ "$graphfile.dot");
foreach my $fmt (qw(ps png svg)) {
- print DEBUG "RUNNING dot -T$fmt\n";
- system_checked("dot", "-T$fmt", "-o$graphfile.$fmt",
- "$graphfile.dot");
+ # neato rather than dot, because neato just uses positions
+ # etc. in the input whereas dot does (re)calculation work.
+ print DEBUG "RUNNING neato -n2 -T$fmt\n";
+ system_checked("neato", "-n2", "-T$fmt", "-o$graphfile.$fmt",
+ "$graphfile.xdot");
}
open SVGI, "$graphfile.svg" or die "$graphfile.svg $!";
open SVGO, ">", "$graphfile.svg.new" or die "$graphfile.svg.new $!";
--
2.20.1
revision graph is big. In my test case this saves about 10s.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v2: New patch.
---
cs-bisection-step | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/cs-bisection-step b/cs-bisection-step
index 027032a1..8544bac0 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -1113,10 +1113,15 @@ END
or die "$!";
if (eval {
+ print DEBUG "RUNNING dot -Txdot\n";
+ system_checked("dot", "-Txdot", "-o$graphfile.xdot",
+ "$graphfile.dot");
foreach my $fmt (qw(ps png svg)) {
- print DEBUG "RUNNING dot -T$fmt\n";
- system_checked("dot", "-T$fmt", "-o$graphfile.$fmt",
- "$graphfile.dot");
+ # neato rather than dot, because neato just uses positions
+ # etc. in the input whereas dot does (re)calculation work.
+ print DEBUG "RUNNING neato -n2 -T$fmt\n";
+ system_checked("neato", "-n2", "-T$fmt", "-o$graphfile.$fmt",
+ "$graphfile.xdot");
}
open SVGI, "$graphfile.svg" or die "$graphfile.svg $!";
open SVGO, ">", "$graphfile.svg.new" or die "$graphfile.svg.new $!";
--
2.20.1