Some layouts (esp. JUNG layouts) run iteratively until they stabilize the
locations of their nodes. A few of them never reach a complete state; they
will continue iterating indefinitely. In the both of these iterative
cases, we artificially limit the number of iterations to 1000.
See com.google.devtools.depan.eclipse.visualization.plugins.impl
.LayoutPlugin.setLayout() for the code in question.
Not only does this impose an arbitrary limit, it interacts poorly with the
user. Some layouts (e.g. FRLayout) run for a very long time on large
graphs (>5min). With no feedback, it can appear that DepAn is hung.
This kind of iterative layout should be run as a background task (i.e. use
the Jobs API). The progress monitor should indicate the limit of the
iterations, and the current iteration. The user should be able to increase
or decrease the limit, and should be able to stop/cancel the layout task at
any time. When the layout task is stopped for any reason (stable, limit
reached, user canceled), the computed locations are used to render the
graph's nodes.
In the best case, the View should update incrementally as the background
task proceeds. Maybe not on every iterations, but it would be nice to
visualize the layout as it proceeds.
Original issue reported on code.google.com by le...@google.com on 12 Sep 2008 at 7:47
Original issue reported on code.google.com by
le...@google.com
on 12 Sep 2008 at 7:47