-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache pre-existing Zarr arrays in Zarr backend #9861
Open
d-v-b
wants to merge
47
commits into
pydata:main
Choose a base branch
from
d-v-b:perf/cache-array-keys
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+162
−62
Open
Changes from 37 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
9503c71
cache array keys on ZarrStore instances
d-v-b 94b48ac
refactor get_array_keys
d-v-b 2dacb2a
add test for get_array_keys
d-v-b c7cfacf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b3cf2e5
lint
d-v-b d9bd7fd
Merge branch 'perf/cache-array-keys' of https://github.com/d-v-b/xarr…
d-v-b 8d47dd3
Merge branch 'main' of https://www.github.com/pydata/xarray into perf…
d-v-b bec8b42
add type annotation for _cache
d-v-b 61fe759
make type hint accurate
d-v-b 0952c93
make type hint pass mypy
d-v-b 96ddcf4
make type hint pass mypy, correctly
d-v-b 60761a8
Update xarray/backends/zarr.py
d-v-b f82659d
Merge branch 'main' of https://github.com/pydata/xarray into perf/cac…
d-v-b 107c4e7
use roundtrip method instead of explicit alternative
d-v-b 2d3c13a
cache members instead of just array keys
d-v-b be5e389
adjust test to members caching
d-v-b 1eaf3ea
Merge branch 'perf/cache-array-keys' of https://github.com/d-v-b/xarr…
d-v-b 9d147b9
refactor members cache
d-v-b bdb20a6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6578caa
explictly revert changes to test_write_store
d-v-b 9596bcf
Merge branch 'perf/cache-array-keys' of https://github.com/d-v-b/xarr…
d-v-b df4274f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5bf7aff
indent correctly
d-v-b df51855
Merge branch 'perf/cache-array-keys' of https://github.com/d-v-b/xarr…
d-v-b 5a818a5
update instrumented tests, remove cache update functionality, and set…
d-v-b c18f81b
update instrumented tests, remove cache update functionality, and set…
d-v-b 7b13099
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8925020
lint
d-v-b 5efbe30
Merge branch 'perf/cache-array-keys' of https://github.com/d-v-b/xarr…
d-v-b 192fc8b
update tests
d-v-b 2ce5b2e
make check_requests more permissive
d-v-b 87a40c7
update instrumented tests for zarr==2.18
d-v-b 7e79b79
Merge branch 'main' into perf/cache-array-keys
dcherian d987529
Update xarray/backends/zarr.py
d-v-b 169b736
Update xarray/backends/zarr.py
d-v-b e20d11d
Update xarray/backends/zarr.py
d-v-b a1c25f2
Update xarray/backends/zarr.py
d-v-b f8d78cb
Update xarray/backends/zarr.py
d-v-b 650937e
doc: add whats new content
d-v-b fcf2d64
fixup
d-v-b bf64fd2
Merge branch 'main' of https://www.github.com/pydata/xarray into perf…
d-v-b dcecf43
update whats new
d-v-b d0bb5a2
fixup
d-v-b 65cadcb
remove vestigial cache_array_keys
d-v-b e8cd3c8
make cache_members default to True
d-v-b 8d31f0e
tweak
dcherian 3d15d3d
Remove from public API
dcherian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about changing the default to
True
? I'd like to know if we think there is a downside (risk, performance, etc.) to defaulting to this behavior?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some weird tests that use
open_store
anddump_to_store
that can't handle that default.For nearly all users, the effective default is the value set in
open_zarr
andto_zarr
(which isTrue
, or should be after that one suggestion is merge)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm up for it! the main risk is whether anyone is actively using
ZarrStore
instances explicitly, with the assumption that they dynamically track the state of the underlying zarr Group. if nobody is doing that, then there's no risk. ofc I have no way of know if this use case is common, but my impression was thatZarrStore
is internal enough that users are not expected to be using it directly.