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/1993#issuecomment-373540862,https://api.github.com/repos/pydata/xarray/issues/1993,373540862,MDEyOklzc3VlQ29tbWVudDM3MzU0MDg2Mg==,5635139,2018-03-15T22:18:52Z,2018-03-15T22:45:24Z,MEMBER,"> (I don't know who wrote this code but woof!)
🙈
Edit: Whoever wrote that code is a hero for contributing so much code - the likeliest sources of bad code are the most prolific and valuable contributors","{""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 3, ""rocket"": 0, ""eyes"": 0}",,305702311
https://github.com/pydata/xarray/issues/1993#issuecomment-373540541,https://api.github.com/repos/pydata/xarray/issues/1993,373540541,MDEyOklzc3VlQ29tbWVudDM3MzU0MDU0MQ==,5635139,2018-03-15T22:17:27Z,2018-03-15T22:17:27Z,MEMBER,"I don't think we use anything created in `_setup_windows()` until we call `__iter__`, which IIUC is only called on non-vectorized methods.
We could:
- Combine `_setup_windows` and `__iter__`: only runs the code when you need it, but would run each time `__iter__` was called
- Combine `_setup_windows` and `__iter__` and cache the result: more code but only need to run the setup code once
- Convert it to a generator: lower up-front cost, but more engineering and doesn't make it cheaper assuming you consumed the whole iterator anyway
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,305702311
https://github.com/pydata/xarray/issues/1993#issuecomment-373538852,https://api.github.com/repos/pydata/xarray/issues/1993,373538852,MDEyOklzc3VlQ29tbWVudDM3MzUzODg1Mg==,5635139,2018-03-15T22:09:47Z,2018-03-15T22:09:47Z,MEMBER,"Quick discovery - it looks like it's spending all the time creating 9m `slice` objects [here](https://github.com/maxim-lian/xarray/blob/master/xarray/core/rolling.py#L179):
```python
self.window_indices = [slice(start, stop)
for start, stop in zip(starts, stops)]
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,305702311