Hi Denis,

rio-convert lacks some of the features of gdal_translate (advanced metadata
translation, statistics, &c) and it may be that the cost of those features
is being especially felt in the GRIB case. In fact, the core of
gdal_translate has some GRIB-specific code that rasterio does not use:
https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdal_translate_lib.cpp#L1763-L1782
.

Hope this helps!

On Wed, Sep 4, 2019 at 6:25 AM Denis Rykov <ryk...@gmail.com> wrote:

> Why gdal_translate so slow compared to rio translate from rasterio?
>
> rio convert:
>
> $ time rio convert download.grib download.tif
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> rio convert download.grib download.tif  15.79s user 2.05s system 72% cpu
> 24.627 total
>
>
>
> gdal_translate:
>
> $ time gdal_translate download.grib download.tif
> Warning: Inside GRIB2Inventory, Message # 15
> ERROR: Ran out of file reading SECT0
> Input file size is 3600, 1801
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> gdal_translate download.grib download.tif  261.99s user 18.57s system 98%
> cpu 4:45.62 total
>
>
-- 
Sean Gillies
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to