I'm trying to add huge data more than a million to XYSeries[]. Means i need multiple XYSeries with each having millions of data. The data comes from a file.
Whenever the file size is about 40 MB it fails with a out of memory error. I just came up with a test code to verify this.
Code: Select all
double time = 50.0;
for (i = 0; i < totalSeries; i++) {
xySeries[i] = new XYSeries("Test"+i,false);
for (j = 0; j < noOfTimes; j++) {
xySeries[i].add(time, i,false);
}
}
"totalSeries" can be from 1 to 128
Our ideal set up has totalSeries as 72 and noOftime as 24000*10. It was good for this set up. But when i increase noOfTime to 24000*15 it fails with out of memory.
My Query:
Ideally i load all the data to RAM and then plot it. But as per this scenario, the memory is exponentially increasing as the data sample count increases. Lot of discussion threads suggested using partial view of data than viewing complete data, but then i have to get the data from flat file. To load partial data and keep track of rest of the data when moving forward and backward in the chart might be challenging. So any idea how can i approach this scenario? Btw, I'm using XYDataset and XYLIneAndShapeRenderer for the chart.
Thanks,
Saravanan