Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of default properties of blosc compressor #6

Merged
merged 3 commits into from
Jun 14, 2023

Conversation

joshmoore
Copy link
Member

Originally opened as bcdev#42


The goal of this PR is to allow the user to set the number of threads used for blosc decompression on the auto-created Compressor objects during read operations.

This is done via CompressorFactory.BloscCompressor.defaultProperties.put("nthreads", 8);

This was the least invasive/modifying approach I could find (in conjunction with PR bcdev#41 for user defined compressor objects). However, it does expose the actual BloscCompressor class and the implementation of the map. I'd be happy to implement something more extensive keeps the class implementation private if the maintainers prefer.

I also only updated the nthreads property to pull from the defaultProperties map rather than the default constants. If this approach is acceptable, I can change the other properties to have the same behavior.

@joshmoore
Copy link
Member Author

Thanks again for this, @pedson. Merging for 0.4.0 but two things occur to me:

  • there's no example usage/docs/tests
  • it feels slightly like a backdoor

Those two taken together might balance each other out. 😄 Before this becomes too ingrained, it could likely use some more discussion (e.g. add interface methods for modifying, etc.)

@joshmoore joshmoore merged commit 8453798 into zarr-developers:main Jun 14, 2023
@joshmoore joshmoore deleted the blosc-multithread-read branch June 14, 2023 07:03
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