Time

With a graph with thousands of graph elements (vertices and edges) it is important that a filter exists directly upon the data that is the output of the model. The Layout functions like an intermediate between the model and the view and should therefore be extended with a filter.

Deprecation

The AbstractLayout?.applyFilter() does indeed provide this functionality. However the Layout.getVisibleVertices() function is deprecated. A reference to the PluggableRenderer.setVertexIncludePredicate() is given, however this means that the whole big set of vertices will be handled by the viewer and the renderer while this isn't necessary.

Vertices iteration

Places where the whole set of vertices is iterated (and if coded correctly subsequently the acceptVertex method of the predicate is evaluated) are multiple:

Solution

These all should iterate the visible vertices by calling layout.getVisibleVertices(). This would accelarate the process significantly with large graphs. So, Layout.getVisibleVertices should definitely not be deprecated.

Valid XHTML 1.0! Valid CSS!