Skip to content
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

Feat/concurrent members #2519

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Nov 26, 2024

Makes AsyncGroup.members() fetch keys and fetch metadata concurrently, which provides a big performance win for high-latency storage backends. The number of concurrent operations is limited by the zarr-wide configuration setting.

in main, Group.members() requires ~O(num_members) time to complete, because it does not perform IO concurrently. In this PR, Group.members runs in constant time (until the number of concurrent requests exceeds the concurrency limit).

@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 26, 2024

note: this PR depends on #2474

@d-v-b d-v-b requested review from jhamman and TomAugspurger and removed request for jhamman November 26, 2024 14:42
@jhamman jhamman added the V3 label Nov 29, 2024
src/zarr/core/group.py Outdated Show resolved Hide resolved


@pytest.mark.parametrize("store", ["memory"], indirect=True)
def test_group_members_performance(store: MemoryStore) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these two tests!

@dstansby dstansby removed the V3 label Dec 12, 2024
@d-v-b d-v-b requested a review from dcherian December 20, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants