diff --git a/src/js/pyodide.js b/src/js/pyodide.js index 0fd102eab..c6fd358ac 100644 --- a/src/js/pyodide.js +++ b/src/js/pyodide.js @@ -147,10 +147,7 @@ function fixRecursionLimit() { recurse(); } catch (err) {} - let recursionLimit = depth / 60; - if (recursionLimit > 1000) { - recursionLimit = 1000; - } + let recursionLimit = Math.min(depth / 50, 400); Module.runPythonSimple( `import sys; sys.setrecursionlimit(int(${recursionLimit}))` );