You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=639) [details] Illustrates issue and contains suggested improvement As illustrated by the example code in main.cpp, the time needed for adding an image to a multipage Tiff increases with the number of images already in the Tiff/size of the image. It appears that this is caused by TIFFLinkDirectory walking through the whole linked list of images every time. This may not be needed if we actually keep track of all directory offsets (or at least the last offset which we have seen); just like is done with reading directories. The attached tif_dirwrite.c contains a suggested enhancement where we use TIFFCheckDirOffset (copied from tif_dirread.c) to improve the writing speed.
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets, such as this one, have been migrated to the libtiff GitLab instance at https://gitlab.com/libtiff/libtiff/issues . The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is the initial Bugzilla issue number.