[gdal-dev] GeoTIFF and concurrent block reads

Even Rouault even.rouault at spatialys.com
Thu Sep 21 07:02:14 PDT 2023


Laurentiu,

>
> GDAL 3.6 added support for multi-threaded reading using PRead, but I 
> couldn't spot ReadBlock using the same code path.

If you read one single block at a time, the multi-threaded optimization 
cannot kick in, since the elementary decoding unit is a block. You must 
call RasterIO() with a window intersecting several block.

>
> (*) I think these can also be implemented at VSI level by wrapping a 
> file handle and turning Seek + Read into a PRead (when supported), 
> even for drivers that don't explicitly support PRead.

The multi-threaded optimization also works for VSI file systems not 
supported PRead(), but doing what you mention above: doing Seek+Read 
under a lock. This is of course less efficient.

Even


-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230921/48d8b845/attachment.htm>


More information about the gdal-dev mailing list