Have transitions declare their dependencies, and don't re-evaluate transitions unless their dependencies were marked dirty (dependencies are a bitmask in an array so it's very fast to check), -13% fsm time, -26% for livestock especially, behaviour is exactly the same as before