hedy
hedy copied to clipboard
[UI] remove timeout?
In #1682 we extended the time limit to 20 seconds for the turtle but I am getting reports that might not be long enough for complex drawings (which we will get even more when we finish the dst generation)
Shall we remove the limit altogether? Since we have the stop button since #2591, kids can't really "program themselves into a corner" because they can always stop execution, so maybe the timeout now is overkill? And it is all client-side so they are not bothering anyone with long-running programs.
In #1682 we extended the time limit to 20 seconds for the turtle but I am getting reports that might not be long enough for complex drawings (which we will get even more when we finish the dst generation)
Shall we remove the limit altogether? Since we have the stop button since #2591, kids can't really "program themselves into a corner" because they can always stop execution, so maybe the timeout now is overkill? And it is all client-side so they are not bothering anyone with long-running programs.
The issue with not having a timeout is that children can crash their browser (and computer) by accidentally running some very memory-consuming program such as an infinity loop with some calculations.
I agree that the timeout should be removed. But we have too look into some front-end memory limit to prevent the earlier stated issue.
I agree that the timeout should be removed. But we have too look into some front-end memory limit to prevent the earlier stated issue.
Great thanks!!
It seems Skulpt does not natively support timeout limits, but we might be able to implement this within Python and add it to the prefix we already add on each run. Something like this:
https://stackoverflow.com/questions/41105733/limit-ram-usage-to-python-program
Not sure if this is a great approach as we do have to catch the exit() in Skulpt again to return some nice error message. But it might be worth investigating as when it works we can use the concept: "Run as long as the user browser can handle it" which makes more sense than simply terminating after x seconds.
Hi @TiBiBa!
I changed the title here, can we just remove the timeout for turtle programs? Or maybe even better set it to really long (10 mins?) I understand it is a bit risky but I think it should be ok!
Will look into this, this should be very easy to fix.