mdickinson / refcycle

Support for displaying and analyzing reference graphs of Python objects.
Apache License 2.0
15 stars 1 forks source link

Fix slow full_subgraph. #26

Closed mdickinson closed 10 years ago

mdickinson commented 10 years ago

AnnotatedGraph.full_subgraph currently iterates over all graph edges, which is inefficient for large graphs. In particular, that makes strongly_connected_components noticeably slow for graphs of more than a few thousand vertices.

Fixes #24.

This is really just a stopgap measure; the correct fix is to get the edge information directly from the strongly_connected_components algorithm, and add a simple subgraph operation that takes the vertices and the edges of the subgraph as input.