Skip to content

Defer OME-Zarr imports until NGFF operations - #15

Merged
trissim merged 1 commit into
mainfrom
codex/lazy-ome-zarr-import
Sep 29, 2026
Merged

trissim merged 1 commit into
mainfrom
codex/lazy-ome-zarr-import

Conversation

@trissim

@trissim trissim commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Problem and behavior

Creating PolyStore's storage registry imports polystore.zarr even for disk-only pipelines. Its top-level NGFF imports bring in OME-Zarr and Dask before the execution server can accept work. This change keeps the Zarr backend registered and configurable, then loads NGFF format/location code only when a Zarr read, write, or metadata operation consumes it. The output format remains a cached value per backend instance.

Closes #14.

Evidence

  • Cold openhcs.runtime.zmq_execution_server import: 1.523 → 0.900 seconds; polystore.zarr import: 0.736 → 0.101 seconds. Three fresh endpoint connections fell from about 1.81 to 1.17 seconds each.
  • Same-code OpenHCS official30 fresh-server 1w_1t run: 30/30 cases succeeded, and all 110 output files matched byte-for-byte. Summed non-job time (total - server compile - server execute) fell 88.976 → 67.294 seconds; all 30 cases improved, median -0.731 seconds. Summed measured total fell 260.928 → 240.582 seconds. Server job timings varied and are not attributed to this import change.
  • PolyStore Zarr, NGFF metadata, and FileManager tests: 142 passed. OpenHCS Zarr-path unit/integration tests: 43 passed, 2 skipped. Ruff E9/F63/F7 and whitespace checks passed.

The paired OpenHCS benchmark data and figure will be retained in the OpenHCS submodule-update PR stacked on #186.

@trissim
trissim marked this pull request as ready for review September 29, 2026 13:39
@trissim
trissim merged commit f94bbbe into main Sep 29, 2026
10 of 11 checks passed
trissim added a commit to OpenHCSDev/openhcs that referenced this pull request Sep 29, 2026
Use the merged PolyStore main commit containing OpenHCSDev/PolyStore#15 and the latest ROI codec fix. Focused local validation: 138 PolyStore Zarr/ROI tests and 20 OpenHCS source/Zarr tests passed.
trissim added a commit to OpenHCSDev/openhcs that referenced this pull request Sep 29, 2026
Resolve the PolyStore pointer against merged OpenHCSDev/PolyStore#15. Focused OpenHCS source/Zarr tests pass on the combined tree (20 passed).
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.

Load OME-Zarr only when the Zarr backend performs NGFF work

1 participant