ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.94k stars 409 forks source link

[Graphviz] Optimize settings to provide cleaner layout #41

Open ondrajz opened 5 years ago

ondrajz commented 5 years ago

The current Graphviz settings used for the output via dot utility is not very useful when used on packages with large call graphs. I believe there must be some way to tweak the graphviz attributes to generate output with cleaner layout. Experienced Graphviz users are welcome to help! :exclamation:

Here's some example from old discussion.

In the picture below I marked the areas with calls which are impossible to distinguish from each other. In situations like this there is little benefit from generating this without using deliberate limits and ignores...

smsufyian commented 5 years ago

Is there any update on this issue ? I want to start contributing by working on this issue .

ondrajz commented 5 years ago

I did not explore options to optimize this yet.

Perhaps choosing same rank for some functions to distribute it better.. but on what properties should it determine the rank? https://www.graphviz.org/doc/info/attrs.html#k:rankType

Feel free to play around to see what might help here. I'm currently working on support for modules.

l1905 commented 4 years ago

https://github.com/mountainstorm/jquery.graphviz.svg

This is a good idea that interactive by javascript.

Maybe set up a chrome extentions to show svg by this library

seeflood commented 10 months ago

Hi guys, is this issue solved? I had the same problem while using this tool to read large projects

seeflood commented 10 months ago

I modified the code of go-callvis locally and integrated it with mountainstorm/jquery.graphviz.svg . Now the http server can render a html page using jquery.graphviz.svg to highlight the nodes and edges.

For example:

image

@ondrajz Can I submit a PR to this repo?