As you mentioned in JIRA, this doesn't work well with large graphs. Can you mention this and include the complexity of the algorithm? I think it's `O(n^3)` but I'm not positive.