I haven't had a chance to look into the code of the load() API, but Im pretty sure there is a memory leak in somewhere. I created an application on Electron and Im using c3.js to draw sparkline charts. I called the load() API inside a timer and the application consumes more than 100 MB of RAM without any reasonable reason. If I comment out the load() API then the memory consumption is around 30 MB.
var remove = false;
if(cpuSparkData[0].length>10){
var remove = true;
}
for(var i = 0; i < data.cpus.length ; i++){
var load = parseFloat(data.cpus[i].load).toFixed(0);
console.log(cpuSparkData.length);
cpuSparkData[i].push(load);
if(remove){
cpuSparkData[i].splice(1,1);
}
}
/*cpuSparkChart.load({
columns: cpuSparkData});
});*/
Same here, the memory increases permanently when calling load in an interval.
Same for me as well. Is there any update on this issue?
Same!
Same!
Is there any update on this issue ?
Ditto
Same here, the memory increases permanently when calling load in an interval.
Face with the same problem these days.
C3 seems to hold all the data loaded into it in the memory and associates them with IDs respectively.
FYI.
Take a look at its reference, c3.data(), to realize that it has the behavior of data caching.
Also take a look at the unload option in c3.load() or the c3.unload().
Most helpful comment
Face with the same problem these days.
C3 seems to hold all the data loaded into it in the memory and associates them with IDs respectively.
FYI.
Take a look at its reference,
c3.data(), to realize that it has the behavior of data caching.Also take a look at the
unloadoption inc3.load()or thec3.unload().