Description
I noticed what I think might be a performance bug: should .compute()
be called on the input data in all the plotting methods (e.g. plot.pcolormesh()
) like it is in .plot()
here
Line 166 in bf27e2c
I was making plots from a large dataset of a quantity that is the output of quite a bit of computation. A script which made an animation of the full time-series (a couple of thousand time points) actually ran significantly faster than a script that made pcolormesh plots of just 3 time points (~2hrs compared to ~5hrs). The difference I can think of is that the animation script called .values
before the animation function, but the plotting script called xarray.plot.pcolormesh()
without calling .values
/.load()
/.compute()
first. A modified version of the script that calls .load()
before any plot calls reduced the run time to 30 mins even though I plotted 18 time points, not just 3.
2d plots might all be covered by adding a darray = darray.compute()
call in newplotfunc()
?
Line 609 in bf27e2c
I guess the 1d plot functions would all need to be modified individually.