Skip to content

Conversation

@cookpa
Copy link
Member

@cookpa cookpa commented Oct 3, 2025

As noticed in #856 , image_read is pretty slow for large images. Part of this is inherent to NIFTI images, but it's made worse by always cloning the input.

So I added a check whereby we only clone if the input pixel type doesn't already match the output type

@cookpa cookpa changed the title ENH: Only clone on read if needed PEF: Only clone on read if needed Oct 3, 2025
@cookpa cookpa changed the title PEF: Only clone on read if needed PERF: Only clone on read if needed Oct 3, 2025
@coveralls
Copy link

Coverage Status

coverage: 76.901%. remained the same
when pulling ee008f1 on io_clone_check
into c4433c2 on master.

@cookpa cookpa merged commit 564f47d into master Oct 3, 2025
2 checks passed
@cookpa cookpa deleted the io_clone_check branch October 3, 2025 18:22
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.

3 participants