The above patches mainly deal with very crowded situations. It's entirely possible (and likely) that they will degrade performance in harmless situations slightly (not that it matters much, but I had to put that out there). I will attach pruned output from perf for a short "huge combat demo" game. Some explanations for what I did:
Clip: We can remove vertices in obstructions, but it's only done for edgeSquares since I'm lazy. The start (ID 0) and goal (ID 1) vertices are intentionally left out for obvious reasons. The first check just makes sure our "starting inside obstructions" hackery doesn't collapse upon itself. Maybe that could be removed.
partialsort: It's somewhat strange to do a full sort based on a rough heuristic (Euclidic distance to bottom-left corner) so we now do a partial sort instead. The patch is not really fleshed out / tuned at the moment.
These patches are merely intended as a stopgap measure until the rewrite (as a JPS, JPS-B or even JPS+ algorithm).