Python graphviz taking huge amount of time during rendering the pdf

Viewed 19

I have a large graph with many nodes and edges. The problem I am facing with the Graphviz python package is that rendering the file takes a lot of time.

There are other alternatives mentioned here and here. But the problem I am facing is that all of them work with the dot file, and these methods generate image files that do not look good; I mean, the formatting intended is not quite visible.

I want a pdf file to be generated. The large image files being generated are crashing my Linux. The default image viewer in Linux cannot handle them, or Mozilla Firefox, though it can open it, takes a tremendous amount of time for a portion of the image to become apparent.

Please can anyone help me generate a pdf file very fast which can be quickly viewed in usual pdf viewers or if an image, so can be easily viewed using usual image viewers?

I want the graphs generated to look something like this, this, and this. [These are the graphs rendered to pdf by python for a subgraph of the input].

For the entire graph, the situation of the dot file is like this, and the command:

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

It is returning the following data.png file, which I cannot view correctly on any image viewer on my Linux system. And also, it is not of the same format (the look of the graph, I mean) as generated by Graphviz render.

And for this dot file, even sfdp is taking considerable time...

0 Answers
Related