novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Default useVoronoi to false when points exceed a limit #1627

Open tfmorris opened 8 years ago

tfmorris commented 8 years ago

While defaulting useVoronoi to true is a nice usability touch for small plots, the D3 implementation of the Voronoi algorithm has quadratic (or worse) behavior rendering it unusable for large plots. In this bug report , I describe an example where rendering takes 6 seconds and updating the interactive layer takes almost 5 minutes (!!) of which 4.8 minutes are spent in d3.geom.voronoi.

I'm not sure what the limit should be, but would suggest that if updating the interactive layer takes more than 100% of the time that rendering the plot did, you're clearly in an undesirable region. The example above is more like 4800% (ie close to 50x the rendering time).

liquidpele commented 8 years ago

older versions had a really bad performance bug, are you testing with the latest version in the master branch?