spiermar / d3-flame-graph

A D3.js plugin that produces flame graphs from hierarchical data.
Apache License 2.0
890 stars 119 forks source link

maximum call stack size exceeded error with large number of nodes #106

Open wonder-mice opened 6 years ago

wonder-mice commented 6 years ago

Error is here:

[Error] RangeError: Maximum call stack size exceeded.
    (anonymous function) (d3-flamegraph.js:5187)
    selection_each (d3.js:1346)
    update (d3-flamegraph.js:5158)
    chart (d3-flamegraph.js:5339)
    selection_call (d3.js:1310)
    Global Code (result.html:126)

At this line:

var maxDepth = Math.max.apply(null, descendants.map(function (n) { return n.depth }));

I have 65763 nodes with max depth around 238.

wonder-mice commented 6 years ago

Probably this: https://stackoverflow.com/a/13440842/506566

spiermar commented 6 years ago

@wonder-mice have you tested your large file with the latest code of #120 ?

bjlaub commented 5 months ago

This appears to be a known limitation in V8: https://issues.chromium.org/issues/40112396