d3-flame-graph icon indicating copy to clipboard operation
d3-flame-graph copied to clipboard

maximum call stack size exceeded error with large number of nodes

Open wonder-mice opened this issue 6 years ago • 3 comments

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 avatar Sep 19 '18 22:09 wonder-mice

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

wonder-mice avatar Sep 19 '18 22:09 wonder-mice

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

spiermar avatar Oct 23 '18 21:10 spiermar

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

bjlaub avatar Jun 06 '24 16:06 bjlaub