-
Notifications
You must be signed in to change notification settings - Fork 51
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
Large timing overhead on TiffReader #550
Comments
I have not specifically measured this so I'll speculate that it is our code that tries to make sure the dimensions are in a consistent order for the rest of the aicsimageio apis to deal with, as well as wrapping it into xarray. |
Thank you for your answer. I profiled this call with the following IPython command:
and got the following results, which suggest some inefficiencies in the code: Global profileZoom on the initialization (right hand side)
Zoom on the
|
return xr.DataArray( |
and once there
aicsimageio/aicsimageio/aics_image.py
Line 506 in e5197d1
self._xarray_dask_data = xr.DataArray( |
although I don't know if this could be avoided.
I am happy to work on all this if there is interest.
Ok this is wonderful and thank you for the detailed profile. I forgot about the reader check. You can give aicsimageio a hint about which reader to use like this:
I think we want to prefer the OmeTiffReader first because it is the more specific one and we don't want to drop ome metadata by accident. Please note that aicsimageio is currently in maintenance mode. Contributions here are most welcome but for further work on this, please consider contributing to bioio. https://github.com/bioio-devs/bioio and bioio-devs/bioio-tifffile and bioio-devs/bioio-ome-tiff |
I'll also add that determine_reader should hopefully be a fixed cost that doesn't scale with the data size. We expect the data loading to be the bottleneck. Arguably we could combine OmeTiffReader and TiffReader into one, which might be interesting. |
Thank you for your help! I wasn't aware of bioio but will definitely consider switching and contributing to it instead. |
We haven't formally announced it but it will happen soon. Thank you again for your interest here! |
System and Software
Description
I am comparing the read of a tiff image with OpenCV,
tifffile
andaicsimageio
.To download the image:
curl https://gitlab.com/dunloplab/delta/-/raw/44256ee77069c308ce478c233cc12d900737b537/tests/data/images/angle_-0.32.tif?inline=false -o angle.tif
Benchmarks with ipython:
I am struggling to understand where this 15x overhead (compared to
tifffile
) comes from. Is there something that I am doing wrong?The text was updated successfully, but these errors were encountered: