otb issueshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues2022-10-03T07:01:21Zhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2310Reduce memory footprint when the output image is not streamable2022-10-03T07:01:21ZRémi CressonReduce memory footprint when the output image is not streamableI propose to implement something in the `ImageFileWriter` to reduce the memory footprint when the output image is not streamable (e.g. when output raster is JPEG2000 or COG (see investigations with `GDALImageIO` in #2309)).
Indeed when t...I propose to implement something in the `ImageFileWriter` to reduce the memory footprint when the output image is not streamable (e.g. when output raster is JPEG2000 or COG (see investigations with `GDALImageIO` in #2309)).
Indeed when the output format `CanStreamWrite` is `False`, the whole image is generated once, without streaming.
The downside is that every pipeline block is triggered over the `LargestPossibleRegion`, which may require a lot of memory, especially when the pipeline has many blocks (or greedy ones!).
A simple enhancement could consist in using an in-memory image object, fully allocated, that is updated with an explicit streaming mechanism that uses the original `m_StreamingManager` parameters.
Of course sometimes we want to keep the original behavior (default).Rémi CressonRémi Cresson