RFC: Replace networkx with igraph
Created by: femtobit
This is branching off of a discussion in #724 were we, not for the first time, encountered the issue of networkx
isomorphism-finding routines being very slow on graphs with a moderately complex structure.
igraph
, however, which we already depend on in the dev
dependencies for testing, is much faster. Furthermore, it supports isomorphism finding with colored edges which is an open issue with our current autmorphism
method, and has more useful features.
Thus, I'd like to propose we make the switch to igraph before 3.0. It is important to do this prior to that release because right now we do leak the graph library used in our public interface. (Because we have a public class NetworkX
that also exposes the graph as a non-private attribute.)
One downside I can see is that python-igraph
wraps a C (C++?) dependency that needs compilation, whereas networkx
is pure Python. On the other hand, I never had issues installing igraph even on cluster machines, so I am somewhat optimistic that this is not a huge problem.