2016.03.18 23:18 "[Tiff] Why is TIFFAdvanceDirectory static?", by AG

2016.03.19 14:40 "Re: [Tiff] Why is TIFFAdvanceDirectory static?", by Bob Friesenhahn

When reading a range of images from large stacks, say you are reading image 20k to image 30k of a 50k image stack, from

> calling TIFFSetDirectory() becomes very expensive.  It could be helped significantly if 

>

> TIFFAdvanceDirectory() was not defined as a static function. Is there a better way of reading such data without using TIFF > AdvanceDirectory()?

It seems that TIFFAdvanceDirectory() is at a lower level than should

be exposed to users since it uses raw offsets. TIFFSetDirectory() is
accessing private libtiff implementation data and has knowledge of
TIFF vs BigTIFF so it is protecting the user from libtiff
implementation details.

Have you profiled a loop based on TIFFSetDirectory() to see where most

of the time is being spent?

Based on where the time is being spent (e.g. on duplicated operations

or operations which must be performed anyway), a justification could

be made for a new interface optimized for this purpose, or a
re-implemention of some small expensive part using the existing
interface.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/