[gdal-dev] GDAL-Kakadu 7.8 Performance Problems

jason.liu jason.liu at spookfish.com
Tue Feb 14 19:17:57 PST 2017


Hi gdal-dev,

Does anybody else experience performance problems with GDAL-Kakadu 7.8?

In my test on a quad-core Linux box, the following code, which takes a
8100x4300 3-band RGB 200MB uncompressed tif and compress it using JP2KAK,
took 19 seconds to execute on average:


    GDALAllRegister(); 

    GDALDataset* srcDataset =
(GDALDataset*)GDALOpen("/home/jason.liu/00000783.tif", GA_ReadOnly); 
    char **papszOptions = NULL; 
    papszOptions = CSLSetNameValue( papszOptions, "QUALITY", "20" ); 

    GDALDriver *driver = GetGDALDriverManager()->GetDriverByName("JP2KAK"); 
    GDALDataset* destDataset =
driver->CreateCopy("/home/jason.liu/00000783.jp2", 
                                                  srcDataset, 
                                                  FALSE, 
                                                  papszOptions, 
                                                  NULL, 
                                                  NULL); 

    if( destDataset != NULL ) { 
        GDALClose( (GDALDatasetH) destDataset ); 
    } 
    GDALClose( (GDALDatasetH) srcDataset ); 
    CSLDestroy(papszOptions); 


Using the kdu_compress app which ships with Kakadu-7.8, the following
command line took 1.3 seconds to execute on average:

    ./kdu_compress -i /home/jason.liu/00000783.tif -o
/home/jason.liu/00000783.jp2

The output jp2 sizes are similar (GDAL-Kakadu compresses down to 40MB, while
kdu_compress compresses down to 30MB). The number of jp2 tiles in both cases
are the same (one).

Changing GDAL settings such as JP2KAK_THREADS and GDAL_FORCE_CACHING seems
to make no significant difference to performance.

Any insights will be greatly appreciated.

Kind Regards
Jason




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GDAL-Kakadu-7-8-Performance-Problems-tp5307960.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list