Zarr version
2.18.7
Numcodecs version
0.15.1
Python Version
3.12
Operating System
Linux
Installation
pip
Description
consolidate_metadata() iterates over all keys in the store, only to access the ones that end in .zattrs, .zarray and .zgroup. For zarr stores that contain multiple millions of chunk files, this will start to become slow as the zarr grows, no matter how fast os.scandir is.
Perhaps it is my bad for storing additional metadata in the metadata files (although I am just following xarray's example of storing _ARRAY_DIMENSIONS etc), but it feels this could be made a lot faster by targeting the files directly (after all they are known to exist in each variable).
I'd be happy to submit a PR for this.
Zarr version
2.18.7
Numcodecs version
0.15.1
Python Version
3.12
Operating System
Linux
Installation
pip
Description
consolidate_metadata() iterates over all keys in the store, only to access the ones that end in .zattrs, .zarray and .zgroup. For zarr stores that contain multiple millions of chunk files, this will start to become slow as the zarr grows, no matter how fast os.scandir is.
Perhaps it is my bad for storing additional metadata in the metadata files (although I am just following xarray's example of storing _ARRAY_DIMENSIONS etc), but it feels this could be made a lot faster by targeting the files directly (after all they are known to exist in each variable).
I'd be happy to submit a PR for this.