[Gegl-developer] Cache strategy

Øyvind Kolås islewind at gmail.com
Tue Jun 16 01:48:28 PDT 2009


On Tue, Jun 16, 2009 at 8:58 AM, johannes hanika<hanatos at gmail.com> wrote:
> this is handled well because changing the last operation in the graph
> will need the output of the previous one, thus incrementing the ``more
> recently used'' value of this one, preventing the important previous
> cache line from being swapped out.
>
> if this swaps out other important cache lines on the way, a mechanism to
> detect such a situation can be implemented (only changing parameters of
> the same op very often and quickly), such a thing is required for the
> history stack anyways, as it would also overflow.
>
> so i was thinking if maybe such a global (in the parent gegl node?),
> straight forward LRU cache with an appropriate hash could work for the
> tiles in GEGL as well (one tile = one cacheline, or one mip-map level of
> a tile = one cacheline..)? did you try it already? if so, how did it go?

Having caches for all nodes effectively implement what you suggest,
since the caches are just GeglBuffers and GeglBuffers that are unused
will end up having all their tiles in swap on disk.

-- 
«The future is already here. It's just not very evenly distributed»
                                                 -- William Gibson
http://pippin.gimp.org/                            http://ffii.org/


More information about the Gegl-developer mailing list