Skip to content

Improvements to generateConfig function#2366

Merged
keller-mark merged 4 commits intomainfrom
keller-mark/generate-config-improvements
Dec 2, 2025
Merged

Improvements to generateConfig function#2366
keller-mark merged 4 commits intomainfrom
keller-mark/generate-config-improvements

Conversation

@keller-mark
Copy link
Copy Markdown
Member

Minor improvements.

Change List

  • Reduces the number of network requests by passing kind parameter to zarrOpen, which is obtained from store.contents() when consolidated metadata is present. Otherwise, zarrita needs to make extra requests as it does not know if we want to open an array or a group. There is still an edge case when arrays lack attrs altogether, and zarrita still makes network requests in these cases as the attrs are not found in the consolidated metadata. I have left a TODO statement about this but it is not currently a major issue as it only results in several extra requests.
  • Enables reading stores that contain recarrays by wrapping zarrOpen in try-catch. Zarrita does not support recarrays as it currently assumes array dtype will always be a string in coerce_dtype. For recarrays the dtype is an array https://github.com/manzt/zarrita.js/blob/23abb3bee9094aabbe60985626caef2802360963/packages/zarrita/src/util.ts#L129
Screenshot 2025-12-02 at 8 48 34 AM Screenshot 2025-12-02 at 8 49 41 AM

Checklist

  • Have tested PR with one or more demo configurations
  • Documentation added, updated, or not applicable

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 2, 2025

Size Change: 0 B

Total Size: 7.35 MB

ℹ️ View Unchanged
Filename Size Change
./packages/main/prod/dist/blosc-********.js 612 kB 0 B
./packages/main/prod/dist/chunk-INHXZS53-********.js 558 B 0 B
./packages/main/prod/dist/deflate-oPeRim-T.js 0 B -208 B (removed) 🏆
./packages/main/prod/dist/higlass-********.js 3.57 MB 0 B
./packages/main/prod/dist/index-********.js 142 kB 0 B
./packages/main/prod/dist/index.min.js 1.38 kB 0 B
./packages/main/prod/dist/jpeg-********.js 15.6 kB 0 B
./packages/main/prod/dist/lerc-********.js 89.3 kB 0 B
./packages/main/prod/dist/lz4-********.js 43.9 kB 0 B
./packages/main/prod/dist/lzw-********.js 2.07 kB 0 B
./packages/main/prod/dist/OrbitControls-********.js 229 kB 0 B
./packages/main/prod/dist/packbits-********.js 541 B 0 B
./packages/main/prod/dist/pako.esm-********.js 37.1 kB 0 B
./packages/main/prod/dist/raw-********.js 133 B 0 B
./packages/main/prod/dist/ReactNeuroglancer-********.js 1.67 MB 0 B
./packages/main/prod/dist/troika-three-text.esm-********.js 179 kB 0 B
./packages/main/prod/dist/webimage-********.js 0 B -801 B (removed) 🏆
./packages/main/prod/dist/zstd-********.js 754 kB 0 B
./packages/main/prod/dist/deflate-********.js 208 B +208 B (new file) 🆕
./packages/main/prod/dist/webimage-BhH-qQhk.js 801 B +801 B (new file) 🆕

compressed-size-action

@keller-mark keller-mark marked this pull request as ready for review December 2, 2025 14:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 2, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 13.65% 9121 / 66783
🔵 Statements 13.65% 9121 / 66783
🔵 Functions 48.51% 524 / 1080
🔵 Branches 67.31% 1392 / 2068
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/config/src/generate-config-spatialdata.js 95.71% 92.3% 100% 95.71% 126-128
packages/config/src/generate-config.js 92.85% 83.78% 87.5% 92.85% 70-71, 83-87, 130, 186-189, 248-251
packages/launcher/src/ControlledLauncher.js 0% 100% 100% 0% 6-210
Generated in workflow #4700 for commit 1ab82eb by the Vitest Coverage Report Action

@keller-mark keller-mark merged commit 9599707 into main Dec 2, 2025
12 of 13 checks passed
@keller-mark keller-mark deleted the keller-mark/generate-config-improvements branch December 2, 2025 17:06
@github-actions github-actions bot mentioned this pull request Dec 2, 2025
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.

1 participant