Nick Lamb ([EMAIL PROTECTED]) wrote:

> On Fri, Nov 12, 1999 at 11:38:57AM +0100, Ewald R. de Wit wrote:
> > You can always read in the linear file in row order (and write the
> > results in column order to memory in the case of 90 degree rotation).
> > This will go at full disk speed. 
> 
> This has optimal performance when the image data is on disk, and there is
> precisely enough memory spare to store a duplicate image in memory, and
> assuming that your disk is very slow and your memory is very fast, which
> is probably true on a typical PC architecture.

Right. This would be the typical case that I'm interested in.

> For almost all the interesting cases this has abysmal performance.
> Example:
> 
> Both images fit in memory => Since this isn't a ZX Spectrum we have a
> cache thrash problem, if we don't use tiles then this will cost us 2x
> -- 10x performance over a mid-sized image.

I don't follow this. L1/L2 cache is being trashed if you use non-tiling
images??
 
> Example:
> 
> Neither image fits in memory => We hit OS swap, worst case scenario
> flags start going off in the swapper heuristics and we wait until
> doomsday while "memory" is paged on and off the disk multiple times
> for each row/ column we process.

One doesn't want to encounter this case in an interactive application
whether you use tiling or non-tiling images.

> Example:
> 
> Sub-image => The process you describe touchs whole strips in this
> case which can again cost us 2x -- 10x performance without a thought
> on mid-sized or large images.

Right, for out-of-mem images this is an example were the tiling
comes in handy.  

> So Ewald, unless your critique of the Gimp tile system is going to
> get a bit more sophisticated I'd prefer to see time spent on fixing
> the thing to not leak tiles onto disk, rather than trying to take
> us back down to the level of Paint Shop Pro 4.0

Well I'm writing an image processing library right now and I was
wondering whether it would be better of with or without a tile system.
That's why I was studying the way Gimp is doing things. No need for
getting upset about me wondering about the workings of it.

Anyway, I won't be using tiling myself as images that don't fit into
memory are of little concern to me. Like you said earlier, photoshop
doesn't handle insanely huge images at all so it's just not an
immediate need for the vast majority of people. This is a matter of
setting priorities (what to optimize and what not).

-- 
  --  Ewald

Reply via email to