home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 940702754

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
940702754 MDU6SXNzdWU5NDA3MDI3NTQ= 5589 Call .compute() in all plot methods? 3958036 open 0     3 2021-07-09T12:03:30Z 2021-07-09T15:57:27Z   CONTRIBUTOR      

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 https://github.com/pydata/xarray/blob/bf27e2c1fd81f5e0afe1ef91c13f651db54b44bb/xarray/plot/plot.py#L166 See also discussion in https://github.com/pydata/xarray/issues/2390.

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()?https://github.com/pydata/xarray/blob/bf27e2c1fd81f5e0afe1ef91c13f651db54b44bb/xarray/plot/plot.py#L609 I guess the 1d plot functions would all need to be modified individually.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5589/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.595ms · About: xarray-datasette