We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Aiocogeo uses ~4x more memory than rio tiler when reading a single tile:
Line # Mem usage Increment Line Contents ================================================ 44 115.3 MiB 115.3 MiB @profile 45 def main(): 46 125.7 MiB 10.4 MiB asyncio.run(_aiocogeo()) 47 128.5 MiB 2.8 MiB rio_tile()
The culprit is the call to skimage.resize when resampling the image:
skimage.resize
Line # Mem usage Increment Line Contents ================================================ 292 118.9 MiB 118.9 MiB @profile 293 def _postprocess( 294 self, arr: NpArrayType, img_tiles: TileMetadata, out_shape: Tuple[int, int] 295 ) -> NpArrayType: 296 """Wrapper around ``_clip_array`` and ``_resample`` to postprocess the partial read""" 297 118.9 MiB 0.0 MiB return self._resample( 298 126.5 MiB 7.6 MiB self._clip_array(arr, img_tiles), img_tiles=img_tiles, out_shape=out_shape 299 )
The text was updated successfully, but these errors were encountered:
Its much better with PIL.Image.resize
PIL.Image.resize
Line # Mem usage Increment Line Contents ================================================ 298 118.4 MiB 118.4 MiB @profile 299 def _postprocess( 300 self, arr: NpArrayType, img_tiles: TileMetadata, out_shape: Tuple[int, int] 301 ) -> NpArrayType: 302 """Wrapper around ``_clip_array`` and ``_resample`` to postprocess the partial read""" 303 118.4 MiB 0.0 MiB return self._resample( 304 118.9 MiB 0.5 MiB self._clip_array(arr, img_tiles), img_tiles=img_tiles, out_shape=out_shape 305 )
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Aiocogeo uses ~4x more memory than rio tiler when reading a single tile:
The culprit is the call to
skimage.resize
when resampling the image:The text was updated successfully, but these errors were encountered: