About Analysis device.insert features

About Analysis device.insert features

@Massimiliano Catinoto

hi,
i am inserting some arrays values using Analysis in this way:
for (var i=0; i < xarray.length; i++){
await device.insert({ variable: ‘plotx’, value: xarray[i], serie:100+i });
await device.insert({ variable: ‘ploty’, value: yarray[i], serie:100+i });
context.log(“X=”,xarray[i]," Y=",yarray[i]);
}
I see that this operation take ~1sec for any insert, and if i have to insert 100 values this is displayed very slowly into the dashboard.
The problem is that in the meantime analysis is involved in inserting data from a payload, if a new payload is ready the dashboard show lines mixed from both old and new payload…

Is possible to insert the whole array using device.insert with some operation like in the following example?:
await device.insert({variable:‘plot’, value: xarray, value_length=100, serie: 100+1});

thanks
Max