Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

NVD3 leaked memory terribly. For us creating and removing a small number of charts quickly ate memory in the tens of megabytes. While the code was readable, it was not a very efficiently written library. I also took issue with how it used a global shared function to throttle chart generation. This feature did not seem to work very well but I did not spend much time with it once I saw the memory footprint.

NVD3 is one of many chart libraries that placed more emphasis on design than robustness. Having gone through many charts I wonder if any of these developers have heard of the Profiles tab on web inspector.

Something like NVD3 can be used on a static page that isn't live updated for a short time. But a long living application will have problems.

In other words don't worry. NVD3 wasn't very good. Go look at the d3 basic chart examples on the d3 example's site. It is not hard to build graphs with d3. You don't need NVD3.

Having said this, I thought the NVD3 editor was pretty cool. Better than the actual library.



I don't really see how your comment is relevant. The important turn of events here is how a piece of opensource software can apparently be retroactively removed from the internet.

It doesn't matter if that piece of software was the best or the worst implementation in its field.


It's relevant as an attempt at consolation. It's sort of like saying to someone who just lost a cat, "It's not too bad, after all, you were allergic."


Are you 100% the memory leak was in nvd3 code? Did you submit a bug report or patch?

I guess some like kicking people when they're down.


>NVD3 is one of many chart libraries

The opposite for this are which?, ie: For people with not enough experience could be good idea to know which ones are bad in this regard and wich ones are good.

I`m in the hunt for a chart library. So far, I think in Google chart and highcharts.


As I mentioned simply using d3 should be good enough. I have not found a chart library that cleans up after itself. You can take a look at the "basic charts" section: https://github.com/mbostock/d3/wiki/Gallery


flot is nice, at least for real time updates on charts. I'm building a websockets enabled realtime dashboard with flot, left it running last weekend, did not leak a bit.


Flot actually leaks quite a bit. We use flot at work and I had to hack the code to keep it from leaking. It doesn't leak as bad as NVD3, but it leaks. You will see it never surrenders the canvas element if you call shutdown on it if you check out memory snapshots.


I wonder what I did wrong on my testing. How did you test and against what version? Do you have a public version of your app or tests?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: