Skip to content

Use the h5py low level API when reading dataset slices - #311

Draft
jchelly wants to merge 9 commits into
SWIFTSIM:masterfrom
jchelly:low_level_read_slices
Draft

Use the h5py low level API when reading dataset slices#311
jchelly wants to merge 9 commits into
SWIFTSIM:masterfrom
jchelly:low_level_read_slices

Conversation

@jchelly

@jchelly jchelly commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Instead of doing a separate read_direct() for each slice when cutting out a region, we can select all slices with H5Sselect_hyperslab() and then do a single H5Dread(). This might avoid some h5py overhead. See also #283.

@kyleaoman kyleaoman linked an issue Apr 8, 2026 that may be closed by this pull request
@jchelly

jchelly commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

The test failure here seems to be due to overlapping ranges being selected in the test that tries to write a spatial subset of a SOAP catalogue. Will need to investigate why that happens and what the result should be.

@jchelly

jchelly commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Relevant information if we do try to use hyperslab selections: https://forum.hdfgroup.org/t/quadratic-runtime-of-selecting-n-hyperslabs/12555 .

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.

Subset writer tests are surprisingly slow

1 participant