2004.09.23 17:41 "[Tiff] 3.7 vs. 3.6.1 performance hit", by Larry Grill

2004.09.23 17:41 "[Tiff] 3.7 vs. 3.6.1 performance hit", by Larry Grill

Hi all,

I'm seeing a large performance hit with 3.7b vs. 3.6.1 compiled under MS VC7 or VC6.

Our the code section loops through rows doing, TIFFReadEncodedStrip and TIFFWriteScanline. The perfomance difference is approximately 30% and I can compare with a simple recompile of our application linking one version of the library vs. the other.

There is no difference in the ReadEncodedStrip methods and I tried commenting out the most obvious change in the WriteScanline method:

        if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
                        if (!(*tif->tif_setupencode)(tif))
                                return (-1);
                        tif->tif_flags |= TIFF_CODERSETUP;
                }
//new stuff i tried commenting out:
                tif->tif_rawcc = 0;
                tif->tif_rawcp = tif->tif_rawdata;

                if( td->td_stripbytecount[strip] > 0 )
                {
                        /* if we are writing over existing tiles, zero length */
                        td->td_stripbytecount[strip] = 0;

                        /* this forces TIFFAppendToStrip() to do a seek */
                        tif->tif_curoff = 0;
                }
//end of new stuff
                if (!(*tif->tif_preencode)(tif, sample))
                        return (-1);

I'll investigate further when time allows, but has anyone else noticed this? Any ideas?

Thanks.

Larry M. Grill
larry@nuglyphix.com
www.nuglyphix.com