Skip to content
  • Ell's avatar
    buffer, gegl-config: compress tile data stored in the swap · 9a7738da
    Ell authored
    Use gegl-compression to compress tile data stored in the swap.
    This can both reduce the swap size, and improve its speed, by
    minimizing I/O.  Compression is normally performed by the writer
    thread, however, if the swap queue is full, and a thread attempting
    to store a tile has to block, the thread attempting the store
    compresses the tile before blocking, to minimize the tile cost in
    the queue, and to distribute compression over multiple threads,
    improving tile-store speed.  Decompression is always performed by
    the thread fetching the tile.
    
    Add a "swap-compression" property to GeglConfig (and a
    corresponding --gegl-swap-compression command-line option, and
    GEGL_SWAP_COMPRESSION environment variable), which specifies the
    compression algorithm to be used by the swap.  This property is set
    to "fast" by default.  Setting it to "none" disables compression
    (in contrast to "nop", which doesn't technically *disables*
    compression, but rather uses a NOP compression).
    
    Note that the "swap-compression" property can be changed during
    runtime, which affects the compression used for future tile stores
    (but doesn't affect existing stored tiles).  This can be used, for
    example, to select a better algorithm when running out of swap
    space.
    9a7738da