On Monday 13 December 2004 16:28, Bob Friesenhahn wrote: > On Mon, 13 Dec 2004, Marti Maria wrote: > >> * Does it make sense to cache transforms in my application? > > > > If you mean caching pixels in a transform, no. There is a > > one-pixel cache already implemented. If you mean caching yet existing > > color transforms... hard to say. A transform can take a lot of memory. > > Creating a transform is a matter of 0.5 seconds on most machines. If you > > are going to use a lot of simultaneous transforms, maybe. But this is > > going to make thinks complex. I would first try the easier, non-caching > > way. If this gives a sluggish feeling to the app, then try caching. > > Presumably the cache is stored in memory. Is there a possibility of > placing the cache in a memory-mapped file so that obtaining access to > the cached transform is as easy as memory-mapping the existing file? > This way the transform can be removed from memory when it is not > needed and only consume disk space.
I've been experimenting, and I definitely need to cache at least some transforms. It turns out to be prohibitively slow to recreate the transform to the monitor profile for every display action, for instance. -- Boudewijn Rempt | "Geef mij maar zuurtjes." http://www.valdyas.org/fading/index.cgi
pgpy2nRmz9xRp.pgp
Description: PGP signature
