Skip to content

Fix performance regression for multiscale images (#1079)#1080

Merged
LucaMarconato merged 1 commit intomainfrom
performance/to-multiscale
Feb 24, 2026
Merged

Fix performance regression for multiscale images (#1079)#1080
LucaMarconato merged 1 commit intomainfrom
performance/to-multiscale

Conversation

@LucaMarconato
Copy link
Member

Restore multiscale_spatial_image.to_multiscale() with Methods.XARRAY_COARSEN as the default for images (Image2DModel / Image3DModel), while keeping the lazy ome-zarr-py path as the default for labels (Labels2DModel / Labels3DModel). This reverts the image regression introduced in #1068 without affecting the memory improvement for labels. The method parameter docstring is updated to document the per-type defaults and link to the tracking issue.

Closes #1079

Restore `multiscale_spatial_image.to_multiscale()` with
`Methods.XARRAY_COARSEN` as the default for images (Image2DModel /
Image3DModel), while keeping the lazy ome-zarr-py path as the default
for labels (Labels2DModel / Labels3DModel). This reverts the image
regression introduced in #1068 without affecting the memory improvement
for labels. The `method` parameter docstring is updated to document the
per-type defaults and link to the tracking issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@LucaMarconato LucaMarconato marked this pull request as ready for review February 24, 2026 21:16
@LucaMarconato LucaMarconato merged commit ee34079 into main Feb 24, 2026
8 checks passed
@LucaMarconato LucaMarconato deleted the performance/to-multiscale branch February 24, 2026 21:49
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.96%. Comparing base (dce49a5) to head (e284b0d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1080   +/-   ##
=======================================
  Coverage   91.95%   91.96%           
=======================================
  Files          51       51           
  Lines        7685     7687    +2     
=======================================
+ Hits         7067     7069    +2     
  Misses        618      618           
Files with missing lines Coverage Δ
src/spatialdata/models/models.py 88.65% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance regression for writing multiscale images

1 participant