2019.04.23 18:55 "[Tiff] TIFFWriteScanLine - buffers to RAM before flushing to disc?", by Paul Hemmer

2019.04.23 21:04 "Re: [Tiff] TIFFWriteScanLine - buffers to RAM before flushing to disc?", by Kemp Watson

Maybe dumb question, something I might do:…. Are you flushing out your source memory or is _it_ accumulating?

[signature_1034191217]

W. Kemp Watson
+1 (416) 970-7284
Objective Pathology Services Limited
13629 Fallbrook Trail, Halton Hills
Ontario, Canada L7G 4S8

From: Tiff <tiff-bounces@lists.osgeo.org> on behalf of Paul Hemmer <paulhemmer@hotmail.com>

I noticed that when using LibTIFF to write a BigTIFF in a scanline based way that it seems like TIFFWriteScanLine doesn't immediately write to disc and flush memory (even though I see a call to TIFFFlush inside the code for TIFFWriteScanLine)... If I write lines in a loop, RAM utilization increases and when I finally call TIFFClose(), there is a delay as the file seems to be actually written, and then all the memory frees. I haven't checked yet to see if the behavior is similar with using Tiled output.

Is this expected behavior? These are large images, where a given scanline can easily be 150,000+ pixels.. Is there a way to stream lines to disc without the internal buffering?

I do understand the benefits of tiled-tiffs for large images, and will see if this behavior is the same, but am curious to understand how this works internally.