<div dir="ltr"><div dir="ltr">Hi Denis,<br><div><br></div><div>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: <a href="https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdal_translate_lib.cpp#L1763-L1782">https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdal_translate_lib.cpp#L1763-L1782</a>.</div><div><br></div><div>Hope this helps!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 4, 2019 at 6:25 AM Denis Rykov <<a href="mailto:rykovd@gmail.com">rykovd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Why gdal_translate so slow compared to rio translate from rasterio?<div><br></div><div>rio convert:<br><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">$ time rio convert download.grib download.tif              <br>Warning: Inside GRIB2Inventory, Message # 15<br>ERROR: Ran out of file reading SECT0<br>Warning: Inside GRIB2Inventory, Message # 15<br>ERROR: Ran out of file reading SECT0<div>rio convert download.grib download.tif  15.79s user 2.05s system 72% cpu 24.627 total</div></blockquote><div><br></div><div><br></div><div>gdal_translate:</div></div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>$ time gdal_translate download.grib download.tif </div><div>Warning: Inside GRIB2Inventory, Message # 15</div><div>ERROR: Ran out of file reading SECT0</div><div>Input file size is 3600, 1801</div><div>0...10...20...30...40...50...60...70...80...90...100 - done.</div><div>gdal_translate download.grib download.tif  261.99s user 18.57s system 98% cpu 4:45.62 total</div></blockquote></div></blockquote></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Sean Gillies</div></div></div>