Using a quad tree to determine nodes that might be close enough to connect, we can greatly reduce the amount of expensive distance checks we perform.
Expensive distance checks are cut down by about 95%
Info