mirror of https://github.com/pyodide/pyodide.git
Try new recursion limit formula (#1638)
This commit is contained in:
parent
f9a68998e5
commit
5318cd5a0c
|
@ -147,10 +147,7 @@ function fixRecursionLimit() {
|
||||||
recurse();
|
recurse();
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
||||||
let recursionLimit = depth / 60;
|
let recursionLimit = Math.min(depth / 50, 400);
|
||||||
if (recursionLimit > 1000) {
|
|
||||||
recursionLimit = 1000;
|
|
||||||
}
|
|
||||||
Module.runPythonSimple(
|
Module.runPythonSimple(
|
||||||
`import sys; sys.setrecursionlimit(int(${recursionLimit}))`
|
`import sys; sys.setrecursionlimit(int(${recursionLimit}))`
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue