Bug 2528 - Improve multipage Tiff by eliminating walk through linked list in TIFFLinkDirectory
: Improve multipage Tiff by eliminating walk through linked list in TIFFLinkDir...
Status: RESOLVED LATER
: libtiff
default
: unspecified
: All All
: P2 enhancement
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2015-11-30 05:07 by
Modified: 2019-10-01 14:20 (History)


Attachments
Illustrates issue and contains suggested improvement (13.97 KB, application/octet-stream)
2015-11-30 05:07, Martijn Aben
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2015-11-30 05:07:26
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.
------- Comment #1 From 2019-10-01 14:20:12 -------
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.