Proposals/User controlled caching of rendering

From SVG
Jump to: navigation, search

This page discusses whether or not we should expose a way for content authors to control caching of rendering in offscreen buffers.

SVG Tiny 1.2's buffered-rendering

SVG Tiny 1.2 has a hint called buffered-rendering for this purpose.

Arguments against user control

  • Some set of authors will misuse the feature causing implementations to have to ignore it by:
    • Using too much memory
    • Using it where they don't need it and causing a performance drop in supporting implementations vs non-supporting implementations
  • A smart implementation should be able to do a good job of automatically deciding when caching is advantageous

Issues with automatic caching

Automatic caching that depends on detecting when some part of the document has been put in motion often produces poor results during the early stage of an animation. The problem is that there will be one or more paints of the moving document fragment before the implementation notices caching is needed, followed by another paint into offscreen buffers. Assuming offscreen caching is actually necessary (performance is crappy without it), these paints make animations perform badly at the start. This is highly undesirable when the animation is in response to user interaction, when immediate and smooth animation us usually highly desirable.

A word on hints

Hints are bad and terrible because...