You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3D/4D Icechunk/Zarr variables were being initialized with full-array reads, which made first render much slower than necessary. This change keeps startup on the currently displayed layer and leaves slider/time updates to request new slices on demand.
Initial fetch path
buildDimensionRangesAndIndices() now always seeds the first load from each dimension’s displayed start position.
Prevents stale slider state from forcing broader reads during variable initialization.
Grid callers
Updated all grid loaders to use the new initial-slice behavior consistently.
Slider-driven reloads still reuse the current indices.
Resulting selection shape
3D variables load as [timeIndex, null, null]
4D variables load as [timeIndex, depthIndex, null, null]
@copilot Does this work for 5D and 6D variables too?
Yes — the helper is dimension-count agnostic. It builds indices from datavar.shape for every non-ignored dimension, so 5D/6D variables keep their extra leading dimensions and still start on the currently displayed slice for the spatial axes.
The new slice logic is already in the app path; this dataset is still slow because the visible [time, depth, null, null] slice touches 10 very large chunks (100x10x200x200), so the backend work is still substantial even though it’s no longer a full-array read. The remaining time is likely chunk fetch/decompression plus browser-side geometry/rendering, not another broad Zarr selection. If you want, I can add timing around zarr.get vs. the render steps to pinpoint the extra ~minute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3D/4D Icechunk/Zarr variables were being initialized with full-array reads, which made first render much slower than necessary. This change keeps startup on the currently displayed layer and leaves slider/time updates to request new slices on demand.
Initial fetch path
buildDimensionRangesAndIndices()now always seeds the first load from each dimension’s displayed start position.Grid callers
Resulting selection shape
[timeIndex, null, null][timeIndex, depthIndex, null, null]Example: