From: pcrews@cerious.com (Phillip Crews)
Date: Wed, 10 Sep 2003 14:36:00 -0400
Subject: [Tiff] read in whole tiff file
In-Reply-To: <MJEBIBGMCDKIGEHPDECCEEANCBAA.pushkar@erc.msstate.edu>
References: <Pine.GSO.4.53.0309100915020.20228@sun06.ams.org>
Message-ID: <4.2.0.58.20030910143456.01377e88@mail.cerious.com>

At 13:51 2003/09/10 , Pushkar Pradhan wrote:
>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


