using InMemoryDatasets
function demo_data()
ds = Dataset(time=0.0, d1=10, d2=20, d3=30)
time = 0.1
for i in 1:100000
if i == 5
d1 = missing
else
d1 = 10+rand(1:30)
end
ds2 = Dataset(time=time, d1=d1, d2=20+i, d3=30+rand(1:30))
append!(ds, ds2)
time += 0.1
end
ds
end
demo_data()
@time ds = demo_data()
The second call needs 4.8s on my machine. For realistic tests I need 1e6 rows in the Dataset. How can I improve the speed and reduce the memory usage?