Avoid redundant metadata reads in ZarrArrayWrapper#8297
Conversation
Modify ZarrArrayWrapper to avoid re-reading metadata each time data is read from the array.
|
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. |
jhamman
left a comment
There was a problem hiding this comment.
Small suggestion but this looks great. No doubt this is going to really improve performance when reading data with zarr.
Co-authored-by: Joe Hamman <jhamman1@gmail.com>
for more information, see https://pre-commit.ci
headtr1ck
left a comment
There was a problem hiding this comment.
I think this looks good, thanks!
Maybe some get_array() calls can be replaced by _array, but that's really minor.
You should add an entry in whats-new!
And as a bonus you could add a benchmark, but that's really optional (seems like there are only netcdf Io benchmarks right now).
|
Thanks @headtr1ck!
Great, this has been done.
I didn't do this. I'll try to add a note to #8290 of a before/after scenario, to illustrate the impact of the reduced requests. |

Modify ZarrArrayWrapper to avoid re-reading metadata each time data is read from the array.
whats-new.rstapi.rst