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/4741#issuecomment-752674453,https://api.github.com/repos/pydata/xarray/issues/4741,752674453,MDEyOklzc3VlQ29tbWVudDc1MjY3NDQ1Mw==,32801740,2020-12-30T16:06:45Z,2020-12-30T16:06:45Z,CONTRIBUTOR,"With some modest refactoring in https://github.com/rhkleijn/xarray/tree/faster-attr-access I managed to speed up attribute style access, ``dir()`` and ``_ipython_key_completions_`` (in this case ~100 fold) by using a more lazy approach and especially avoiding the eager ``{d: self[d] for d in self.dims}`` which constructs many (mostly unneeded) ``DataArray`` objects. ``` %timeit ds.var0 468 µs ± 1.96 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %timeit dir(ds) 499 µs ± 1.51 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) %timeit ds._ipython_key_completions_() 242 µs ± 1.03 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) ``` Shall I open a pull request for this?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,776520994