Avoid using some NetworkX functions in hot code paths. Some functions, like Graph.size() to get the number of edges in a graph, were showing up taking surprising amounts of time.
Don't split triangles unnecessarily early, because the results of the split are often discarded as soon as the triangulation hits a dead-end.
This works best with #18. Otherwise the time taken in improveEdgeOrderMore shadows these improvements. With these two pull requests the program has produced plans for up to 500 portals in less than 70 seconds most of the time (--attempts 1 --skipplot, on a mediocre laptop). Without this, it was very hard to get results even for 100 portals.
Avoid using some NetworkX functions in hot code paths. Some functions, like
Graph.size()
to get the number of edges in a graph, were showing up taking surprising amounts of time.Don't split triangles unnecessarily early, because the results of the split are often discarded as soon as the triangulation hits a dead-end.
This works best with #18. Otherwise the time taken in
improveEdgeOrderMore
shadows these improvements. With these two pull requests the program has produced plans for up to 500 portals in less than 70 seconds most of the time (--attempts 1 --skipplot
, on a mediocre laptop). Without this, it was very hard to get results even for 100 portals.