I am trying to get a larger amount of data. Sample data is below
1850/01 -0.845 -0.922 -0.748 -1.038 -0.652 -1.379 -0.311 -1.053 -0.636 -1.41
new Array(length)
Specify the array's length rather than creating an empty array. Writing to an existing offset in an array is substantially faster than creating a new offset each time you write an item.
var data = new Array(lines.length); // Specify array length
$.each(lines, function(index, row) {
var cells = row.split(','),
series = {
type: 'line',
data: new Array(cells.length) // Specify array length
};
$.each(cells, function(itemNo, item) {
if (itemNo == 0) {
series.name = item;
} else {
series.data.push(parseFloat(item));
}
});
data.push(series);
});