[gdal-dev] GDAL Speed Optimization

Frank Warmerdam warmerdam at pobox.com
Thu Jun 10 10:53:09 EDT 2010


Stefano Moratto wrote:
> The performances are quite acceptable but when I try to print they are not.
> 
> The drawing to be printed has a resolution larger of the screen (Screen 
> : 1024x1024, Printer 4096 x 4094 in A4 and 9000 x 9000 in A3 approximately).
> I think tha the bottleneck could be found in:
> 1) jpeg decompression.
> 2) bitmap interpolation (I use the low qualitiy settings).
> 3) warping ( I use an approsimated warping function).
> 
> An increase of performance could be achieved using
> 1) hw accelerated functions as IPP or GPU (e.g CUDA)
> 2) parallel alghorithms that takes advantage from multicore CPU
> 
> Has someone already approched these problems?

Stefano,

Are the same number of jpeg tiles being used when producing print products
as on screen?   I'm assuming the answer is yes, and that the warper is just
interpolating a higher resolution result from them.

If the answer is yes,  then presumably the time decoding the jpegs would
not be greater for the prints than for screen display, though it is
possible that more re-reading is occuring.  If re-reading is an issue
you might want to increase the size of the GDAL block cache.  Programmatically
this can be done with the C function GDALSetCacheMax().  Try setting it to 100
(for 100MB).

Are you using the warper just to interpolate to different sizes or are
you also applying reprojection or some other non-linear warping?  If you
are just using it to resize the image then I would suggest using something
less general-purpose than the warper to do the interpolation.

Seth's CUDA work may also be of interest of course, but before committing
to that path I would suggest some analysis of where the time is really being
spent.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list