tlnagy / OMETIFF.jl

I/O operations for OME-TIFF files in Julia
Other
24 stars 7 forks source link

Profile loading code #36

Closed tlnagy closed 4 years ago

tlnagy commented 5 years ago

I've never properly profiled my code to find performance bottlenecks, but it takes 13 seconds and 3.7GiB to load a 1.7GB image on my workstation, which seems excessive. I should be more aggressive on assuming internal consistency and only fallback when it fails:

https://github.com/tlnagy/OMETIFF.jl/blob/d1e0989d891d8283e099bd83eb46a10becb9dbbd/src/loader.jl#L98-L99

tlnagy commented 5 years ago

https://github.com/JuliaLang/julia/pull/33046 would go a long way to address this because then I wouldn't need to preallocate the slice and could directly read into a view of the full array.

tlnagy commented 4 years ago

Also, a majority of that time is due to FileIO!? https://github.com/JuliaIO/FileIO.jl/issues/189#issuecomment-557757946

tlnagy commented 4 years ago

41 is also halving the memory requirements and resolving https://github.com/JuliaIO/FileIO.jl/issues/241 should lead to a 3x speedup, which means I can probably close this once those are both merged/fixed.