From 5318cd5a0c90f270cfa3358157a3d276d020c77d Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 18 Jun 2021 14:45:43 -0700 Subject: [PATCH] Try new recursion limit formula (#1638) --- src/js/pyodide.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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}))` );