html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/4789#issuecomment-766983346,https://api.github.com/repos/pydata/xarray/issues/4789,766983346,MDEyOklzc3VlQ29tbWVudDc2Njk4MzM0Ng==,14808389,2021-01-25T17:33:19Z,2021-01-26T21:59:20Z,MEMBER,"that seems to be the main issue. With
```diff
diff --git a/xarray/core/formatting.py b/xarray/core/formatting.py
index 282620e3..f825ed85 100644
--- a/xarray/core/formatting.py
+++ b/xarray/core/formatting.py
@@ -300,9 +300,11 @@ def _summarize_coord_multiindex(coord, col_width, marker):
def _summarize_coord_levels(coord, col_width, marker=""-""):
+ indices = list(range(10)) + list(range(-10, 0))
+ subset = coord[indices]
return ""\n"".join(
summarize_variable(
- lname, coord.get_level_variable(lname), col_width, marker=marker
+ lname, subset.get_level_variable(lname), col_width, marker=marker
)
for lname in coord.level_names
)
```
I get a speed up of about 180x (for `xr.DataArray(pd.Series(25_000_000, index=idx))`, not sure if the speed-up is as significant for bigger arrays). We should probably make the shape of `indices` depend on `col_width`, though.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,782943813