spiermar / d3-flame-graph

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

don't use Array.prototype.map() when computing maxDepth #231

Open bjlaub opened 5 months ago

bjlaub commented 5 months ago

Particularly dense flamegraphs may fail with a RangeError: Maximum call stack size exceeded on this code path. Instead, compute the maxDepth by iterating descendants in a loop.

Fixes https://github.com/spiermar/d3-flame-graph/issues/106