2003.09.10 18:36 "[Tiff] read in whole tiff file", by Phillip Crews
This is exactly what I wish to do: parallelize the RGB TO LHS transform. Some researchers suggested me to read in the whole image before distributing tiles/strips to different processors to achieve linear speedup. Maybe reading in the image in one call (TIFFClientOpen?) can save I/O overhead instead of multiple calls to TIFFReadTile etc.
Assuming that it's a very large image, you're probably spending the vast majority of clock time waiting for disk I/O, and doing one large I/O will probably not improve things much. A striped (RAID 0) storage array may speed it up appreciably.
For large files, and depending on your platform, I/O subsystem, and CPU speed, the following ideas may also speed up reading the TIFF file somewhat:
- Turn off memory mapping
- Turn off stripchop support
IIRC, you can do this in the TIFFOpen mode string ("rm" - disable memory mapping, "rc" - disable stripchop, "rmc" - disable both).
Once it is in memory, parallelizing the LHS to RGB code may make that part of the process quicker.
- Phillip