Remove num_edges call. Reduces example time from 3 minutes to .6 seconds.