scverse / scverse/spatialdata

Investigate if `ome-zarr-py` Labels class __init__ leads to performance implications

Open
#1,190 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance 🚀
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

I noticed that the constructor of the Labels class in the recent ome-zarr-py release calls a function that computes unique values for the biggest scale of labels: https://github.com/ome/ome-zarr-py/blob/025e83da618ec9e74f4b41f05814fce07b029356/ome_zarr/classes/image.py#L1140

I haven't done regression tests on this, but let's keep an eye and see if this means that we are getting a slowdown upon read.

CC @ajkswamy @Tomaz-Vieira @melonora

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked ome_zarr/classes/image.py location and inspect the Labels class init, especially the unique-value computation for the biggest label scale. Compare label-read behavior with and without that computation, then document whether it causes a slowdown and add regression coverage if the project provides a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.