GDAL-Kakadu 7.8 Performance Problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GDAL-Kakadu 7.8 Performance Problems

jason.liu
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