Save file: https://www.dropbox.com/s/3dbn817izpbv5kv/waar-hang.zip?dl=0
I've tracked down where the time is going it's in the function BackToFrontEdge, and the problem is that it is iterating over a gigantic WAArea array (54010 entries) and then each of the entries in there is doing a large loop, e.g. the for d = WAArea[c]["position"]["x"] .. WGA[a]["MaxX"] loop for y=-29 is going from -1024 to 1030. so that in total the mod goes through the innermost Outside/On the Boundary test 83 million times.
What's odd is the array looks like it has a ton of duplicates in it. The entry for y=-29 shows up at array[54009] then array[53987] for x=-1023 .. 1030; then array[53958] for x=-1022 .. 1030. That means that for long stretches of water, the mod is re-evaluating the same points repeatedly.
I'm wondering if there's a bug in the edge detection algorithm that kicks in when played on a ribbon world.