-
Notifications
You must be signed in to change notification settings - Fork 258
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
alignment constraints cause explosion of internal constraints in vpsc #117
Comments
Hi Gordon, I didn't look at your code, but I can think of two possibilities here:
Does that help? Otherwise, we'll dig in a little bit more :-) Cheers, Tim On 18 June 2015 at 07:11, Gordon Woodhull notifications@github.com wrote:
Dr Tim Dwyer BSc BCS(Hons) PhD |
Thanks for your help. This is with just two alignment constraints of this form:
so I don't think there should be any cycles. That is a helpful tip about watching for the Note: the linear increase of 1-3 constraints is per- By contrast, if I re-construct cola on each step with |
BTW, I also ran into a case where these alignment constraints cause layout not to converge at all: It's kind of hard to see the jitter with just a couple of screenshots, but the middle two (blue and purple) nodes are oscillating back and forth together, and layout doesn't terminate because of them. But this may be because there are hundreds of erroneous constraints by this point. |
So, it turns out that there are some big differences between constructing a new On a guess, I decided that since it obviously is keeping some state (including Now I can move along to my layout problems, so that's great! |
Hi Tim!
I have this page to test dynamic graph layout using dc.graph.js and cola.js:
http://dc-js.github.io/dc.graph.js/index.html?reinit=0&displace=0&linklength=30
I'm trying to draw a graph with displacement and alignment (rank) constraints. Each step I am adding or removing a few nodes and edges, and I feed new nodes, links, and (in this case two) constraints to cola.js as so:
But the two alignment constraints cause cola.js to slow down to a halt (and use 100% CPU) unless I reboot cola.js each step (by constructing
cola.d3adaptor()
).Putting a profiler on it, I found most of the time is being consumed in
Variable.prototype.visitNeighbours
. So I added a logand set my looper to just go back and forth between step 6 and 7.
Externally, there are two alignment constraints, with one "rank" having about 9 nodes and the other about 7 nodes.
It looks like the number of internal constraints for the different kinds of variables increase linearly (by 1s, 2s, and 3s), starting out in the dozens and getting up into the thousands, before it completely eats the CPU and is difficult to stop.
For example, two corresponding sections of log near the end:
Am I doing something wrong, or should replacing the two alignment constraints each step be okay?
Thanks,
Gordon
The text was updated successfully, but these errors were encountered: