mesh
mesh copied to clipboard
optimise routes calculation and topology updates for fully connected mesh of node
Fixes #102, #104
I kind-of get what you are aiming at here, but I have a concern about the way it's done. This PR adds an extra check into the most complicated part of the code. I suspect much of that loop can go now - we don't need to sort lists that we know are of length 1, etc. So, although it will lead to more lines of code, I think it will be more understandable to have a whole separate routing algorithm for the 1-hop case.
Maybe I'm wrong. We can discuss.
Updated the PR to handle optimizations w.r.t both topology updates and routes calculations in case of fully connected mesh nodes topology.
Also as per the review comment, introducing separate routing algorithm for fully connected topology.