You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user submit some Python/Blockly code, the judge currently needs to initialize the ScriptEngine before being able to actually run the program, which takes a few seconds.
Since we reduced the execution's duration to 3 seconds before a timeout occurs, we now reach it everytime when running Python code.
We can increase the duration's limit in case of the programming language is Python or Blockly to get around this issue, but it would be better to initialize the Script Engine at startup or to reduce the time it takes to initialize it.
The text was updated successfully, but these errors were encountered:
The first time we execute a script, we need to load all the corresponding classes, which takes a lot of time, and also to define some binding stuff in the python world, which is rather fast.
So, one solution would be to execute any python script at startup to actually load all the jars. The bindings can be rebuild each time, it won't take long.
I would say that the problem also exist for scala, at least partially. So here to we'd gain in performance by preloading the classes.
The clean way to do so could be to add a preload() method in each ProgrammingLanguage, in which each subclass does what it needs to fill the class loader.
When a user submit some Python/Blockly code, the judge currently needs to initialize the ScriptEngine before being able to actually run the program, which takes a few seconds.
Since we reduced the execution's duration to 3 seconds before a timeout occurs, we now reach it everytime when running Python code.
We can increase the duration's limit in case of the programming language is Python or Blockly to get around this issue, but it would be better to initialize the Script Engine at startup or to reduce the time it takes to initialize it.
The text was updated successfully, but these errors were encountered: