AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.07.03 12:58 "Re[Tiff] ading / Writing in chunks", by <lev@visionmap.com>
2008.07.03 15:14 "Re: Re[Tiff] ading / Writing in chunks", by Bob Friesenhahn

2008.07.03 15:14 "Re: Re[Tiff] ading / Writing in chunks", by Bob Friesenhahn

On Thu, 3 Jul 2008, Lev_B wrote:

>
> Is there any way I can make LibTiff read and write in chunks of at least a
> given size?
> I use memory mapping for reading. Tiffs are stripped.

This should be primarily a function of strip size, for which libtiff 
provides several explicit APIs.  However, it is important to recognize 
that memory mapped I/O is different than programmed I/O.  With 
memory-mapped I/O the I/O happens when the CPU accesses an address 
which corresponds to a new memory page (page could be 4K, 8k, 16k in 
size depending on system architecture), or the OS decides to flush a 
dirty (updated) page.  The number of pages transferred to/from memory 
at once is up to the OS/MMU and not libtiff.

Libtiff is not particularly sophisticated with its memory mapping.  It 
maps the whole file at once and does not use any APIs to suggest that 
the OS should pre-read certain pages or expire certain pages.

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