Skip to content

ZarrPixelsService: store the Zarr group into the cache - #64

Merged
chris-allan merged 5 commits into
glencoesoftware:masterfrom
sbesson:zarrpixelsservice_groupcache
Nov 9, 2026
Merged

chris-allan merged 5 commits into
glencoesoftware:masterfrom
sbesson:zarrpixelsservice_groupcache

Conversation

@sbesson

@sbesson sbesson commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Updates the ZarrPixelsService to store the Zarr multiscale groups rather than their metadata only into the configurable cache. The pixel buffer can retrieve additional information including the Zarr format version and access the group attributes via the metadata() API.

The static Zarr group and array opening methods are also updated to try versioned calls directly to reduce the number of calls.

This updates the ZarrPixelsService to store the Zarr multiscale groups rather
than their metadata only into the configurable cache. The pixel buffer can
retrieve additional information including the Zarr format version and access
the group attributes via the metadata() API.

The static Zarr group and array opening methods are also updated to
try versioned calls directly to reduce the number of calls.

@chris-allan chris-allan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see a reason why this should not go in nearly as is. Especially with the zarr-java design decision to guarantee that the opening of a Group or Array includes node metadata (regardless of whether it's zarr v2 or v3). Caching the node rather than the metadata map is just superior in almost every way.

Adding ZarrException to the public method prototypes did give me some pause but we have precedent doing that with BfPixelBuffer and FormatException.

Creating our own version of Group.open() and Array.open() also makes sense here as it avoids the two .exists() calls that currently happen in each of those static methods.

The current usage of getZarrPath only returns the Zarr group (v2 or v3)
associated with the root path at which the store handle is initialized.
If future iterations need to resolve groups deeper in the hierarchy,
this API can be updated to handle a subpath.
@sbesson
sbesson marked this pull request as ready for review November 9, 2026 11:32

@chris-allan chris-allan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement and foundation for the additional changes that need to happen.

@chris-allan
chris-allan merged commit d606c79 into glencoesoftware:master Nov 9, 2026
7 checks passed
@sbesson
sbesson deleted the zarrpixelsservice_groupcache branch November 9, 2026 11:48
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.

2 participants