Instead of iterating over full set, use sweep line algorithm to limit the number of nodes needed to be searched. This improves the speed of the dynamic ratsnest.
This updates the Kruskal algorithm to a faster variant utilizing a compressed disjoint set and heap