@xpil You've probably already tried iterating through lengths and using the Pythagorean theorem to check if the other side is rational.

I haven't gotten far with this other idea, but a little research introduced me to:

(a) Euclid's formula for Pythagorean triples

(b) Heron's formula / Heronian triangles

These are both fairly new ideas to me and I'm not really sure how to apply them to this problem. However, they /might/ make a faster solution?