[gdal-dev] Slow createCopy()

Even Rouault even.rouault at mines-paris.org
Mon Nov 24 17:19:09 EST 2008


And even if your input and output datasets are scanline oriented, you are 
using a VRT as an intermediate, and VRT has blocks of size 128x128...

Le Monday 24 November 2008 23:10:13 Frank Warmerdam, vous avez écrit :
> Tom V. wrote:
> > Hi,
> >
> > I'm using gdal 1.4.2 to write out NITF and GeoTiff images.  The
> > createCopy() call takes only a few minutes to write out a small file, 300
> > or so mb's, but takes anywhere from 1.5-3 hours to write out a single
> > band 1.2 gb NITF or GeoTiff.  I have not tried a larger multi-spectral
> > image.
> >
> > The call looks like:
> > GDALDatasetH hOutDS = GDALCreateCopy( hDriver, pszDest, (GDALDatasetH)
> > poVDS, false, papszCreateOptions, pfnProgress, NULL );
> >
> > with papszCreateOptions and pfnProgress being NULL in this case, hDriver
> > being the appropriate driver and, and poVDS being a vrtdataset.
> >
> > If anyone has any idea why the larger files would take so long, that
> > would be awesome!
>
> Tom,
>
> You didn't indicate much about the configuration of the input and output
> files.  But I suspect cache thrashing.  If that is the case, upping the
> memory cache size will help (dramatically).
>
> Try setting the GDAL_CACHEMAX environment variable to 200 before running,
> or call GDALSetCacheMax( 200 ).   This would use up to 200MB for the
> intermediate block cache.  This is particular important when going from
> scanline oriented formats to tile oriented formats or the other way around.
>
> If this isn't already in the FAQ, it really needs to be!
>
> Best regards,




More information about the gdal-dev mailing list