uniter icon indicating copy to clipboard operation
uniter copied to clipboard

Add execution timeout

Open asmblah opened this issue 11 years ago • 1 comments

Infinite loops in the browser can lock up the UI so are a big no-no. Uniter should support the set_time_limit(...) function in order to handle this scenario.

The default of 30 seconds in the Zend engine is too high for in the browser: a default of 1 second should be enforced there.

asmblah avatar Feb 03 '14 21:02 asmblah

Added initial draft of PHP execution time limit support in feature/execution-timeout branch.

  • Currently naively hooks 'do...while' and 'while' loops with an expiry check for every iteration
  • Could be improved to only check every N iterations
  • Still need to add support for other loop types, eg. 'for'

asmblah avatar Feb 03 '14 22:02 asmblah