cjdelisle/cjdns — pull request #410 by Arceliar (2014-01-03 00:11:43+00:00)
Title: More path selection fine tuning

Select path to use based on minimizing expected latency * label length (actually maximizing the inverse). This gives better resolution of path length for short paths, and seems to stabilize which one is chosen.

When trying to send a packet, only initiate a search requests if we don't already know a destination with an expected ping time of less than about 2 seconds. Avoids a lot of useless searches.

I had a fix to cut down on the time between pings, but the patch from a few hours ago is simpler and ought to work just as well in most cases, so I removed it.