Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for re-flowing graphs with dynamically-sized nodes #134

Open
brianchin opened this issue Aug 26, 2014 · 4 comments
Open

Support for re-flowing graphs with dynamically-sized nodes #134

brianchin opened this issue Aug 26, 2014 · 4 comments

Comments

@brianchin
Copy link

If you had a graph that you wanted to interact with, then nodes could potentially be resized as you use it (e.g. by expanding or collapsing information in the node). From what I've read of the graph layout algorithm, it seems that the first two steps of the graph layout (ranking and ordering) could be kept between iterations of the algorithm. Would it be possible to add this to dagre with its current architecture?

@cpettitt
Copy link
Collaborator

Since all of the stages are deterministic out of the box I would expect that you could rerun the layout with the new dimensions and get the same layout taking into account the new dimensions. We could also take an attribute that skips the rank and order phases for efficiency reasons, but this would require that all nodes already have a rank and order assigned. It shouldn't be a lot of work to do this, provided we're getting the deterministic layout I'm expecting.

@brianchin
Copy link
Author

The big question: Would this save us much in terms of rendering time? I don't know how expensive ranking and order are compared to the later phases. If it isn't at least 50%, there probably isn't too much of a reason there.

@cpettitt
Copy link
Collaborator

You can find out empirically by setting the debugLevel to at least 1. This will turn on timing instrumentation for each of the phases.

@brianchin
Copy link
Author

On the first graph I'm working on, it appears that about 2/3rds of the time is spent on ranking and ordering (131ms of 193ms). There may be something there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants