In the worst case just put a 3sec limit on the evaluation and stop it if it doesn't complete in time, problem solved.