Skip to content

Conversation

@marcovarrone
Copy link

Towards #228

Replace the code to load the Xenium segmentation masks to use Dask to greatly reduce the memory consumption of the Xenium reader.

I abandoned the idea of saving each element to free up memory because the Xenium reader is already mostly Dask-compatible, so it will not bring any advantage.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 83.09859% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.06%. Comparing base (5f829f5) to head (d3a247c).

Files with missing lines Patch % Lines
src/spatialdata_io/readers/xenium.py 83.09% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #337      +/-   ##
==========================================
- Coverage   55.30%   55.06%   -0.24%     
==========================================
  Files          26       26              
  Lines        2846     2851       +5     
==========================================
- Hits         1574     1570       -4     
- Misses       1272     1281       +9     
Files with missing lines Coverage Δ
src/spatialdata_io/readers/xenium.py 71.88% <83.09%> (-1.06%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaMarconato
Copy link
Member

Hi @marcovarrone, my apologies for the delay in reviewing this (or the other PR).

Great idea! In this PR the tests fail because the temporary directory where we extract the zip data is cleaned up when the function exit. I think opening the .zarr.zip file using a ZipStore should do the trick.

Meanwhile, to benchmark the performance gain in a more transparent way, I rely on an explicit extraction. I'll do some benchmarks and document the changes.

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.

3 participants