zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

Feature: support uvloop as a faster alternative to Python's default IO loop

Open jhamman opened this issue 3 months ago • 3 comments

Adds support for uvloop as a faster alternative to Python's default IO loop.

closes #3451

TODO:

  • [x] Add unit tests and/or doctests in docstrings
  • [x] Add docstrings and API docs for any new/modified user-facing classes and functions
  • [x] New/modified features documented in docs/user-guide/*.rst
  • [x] Changes documented as a new file in changes/
  • [x] GitHub Actions have all passed
  • [ ] Test coverage is 100% (Codecov passes)

jhamman avatar Sep 14 '25 03:09 jhamman

Codecov Report

:x: Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 61.27%. Comparing base (62551c7) to head (2230848). :warning: Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/zarr/core/sync.py 82.35% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3452      +/-   ##
==========================================
+ Coverage   61.24%   61.27%   +0.02%     
==========================================
  Files          83       83              
  Lines        9907     9922      +15     
==========================================
+ Hits         6068     6080      +12     
- Misses       3839     3842       +3     
Files with missing lines Coverage Δ
src/zarr/core/config.py 29.16% <ø> (ø)
src/zarr/core/sync.py 63.93% <82.35%> (+2.25%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 14 '25 04:09 codecov[bot]

is there a good way to demo the performance difference between uvloop and asyncio? If so, would it make sense to include that demo in the examples directory?

d-v-b avatar Sep 14 '25 09:09 d-v-b

Note that asyncio seems to have been improved in recent versions of Python, almost filling the gap with uvloop (see https://github.com/MagicStack/uvloop/issues/566 and https://github.com/MagicStack/uvloop/pull/644).

DimitriPapadopoulos avatar Oct 13 '25 20:10 DimitriPapadopoulos