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

Time Savings with Interactive Mode #15

Closed
dustinsanders opened this issue May 25, 2016 · 3 comments
Closed

Time Savings with Interactive Mode #15

dustinsanders opened this issue May 25, 2016 · 3 comments

Comments

@dustinsanders
Copy link

I'm using klay to render large graphs (~400 nodes) and this is taking around 7 seconds. I was wondering if there is any mechanism to take into account previous positions when adding another node as to not incur the entire cost of the layout algorithm. In example if I had a graph of 400 nodes graphed and want to add another node to the graph.

I saw the interactive mode example and this seems promising, but just wanted to see if this is possible before I get started.

@uruuru
Copy link
Member

uruuru commented May 26, 2016

The interactive mode still runs the whole layout algorithm, i.e. all five phases. Still, the interactive strategies may be less costly than the sophisticated implementations. So you could give it a try. You would have to determine reasonable positions for your new nodes yourself though. Otherwise they won't be placed properly. Maybe you can select a handful of nodes that are related to the new node, layout this small sub-graph and use the relative position of the new node for your interactive layout.

7 seconds is a long time for 400 nodes. I am wondering if this is due to your graph structure or javascript. Can you share your example so I can give it a try with the Java version?

@dustinsanders
Copy link
Author

dustinsanders commented May 26, 2016

Let me know if this doesn't work

@uruuru
Copy link
Member

uruuru commented May 30, 2016

I gave it a try in java and even there it takes about 2s. The reason is that your graph contains quite a lot of long edges which are turned into dummy nodes internally. For your instance about 7200 dummy nodes are created. The following two options should speed up the process significantly, down to 400ms in java.
For the second option you'll need existing y-coordinates though (assuming left-to-right layout).

    de.cau.cs.kieler.klay.layered.greedySwitch: OFF
    de.cau.cs.kieler.klay.layered.crossMin: INTERACTIVE

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