google / google-visualization-issues

288 stars 35 forks source link

Large memory leak in candlesticks and ColumnChart charts #2255

Open axvpast opened 8 years ago

axvpast commented 8 years ago

When update data in this charts each 30s, browser (Chrome/Firefox) consume more than 2GB and die in 1 day.

window.closure_memoizecache "cache" some millions of objects.

As workaround can be used forced cleanup like: setInterval(function (){ _.each(closure_memoizecache, function (v, k){ delete closure_memoizecache[k]; } ) }, 10000);

dlaliberte commented 8 years ago

Which version of Google Charts are you using? We did some work quite a while ago to clean up more memory leaks which should address the leaks you are working around, I suspect.

axvpast commented 8 years ago

1.0 (current prod version) You can see it alive here: https://cex.io/btc-usd But pay attention to console log messages like: Install google charts memory leak workaround.

dlaliberte commented 8 years ago

I would suggest switching to use the newer versions: https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code If the problem still persists, we will be more interested in fixing the problem.

axvpast commented 8 years ago

You mean version 2 - current/experimental dev?

dlaliberte commented 8 years ago

'current' would be good enough, using the new gstatic loader.