Skip to content

Raster cache heuristics are bad. #88832

@dnfield

Description

@dnfield

We currently raster cache anything under an opacity layer always, and other things only if they appear for so many frames, and use an acknowledged bad measure for whether a picture is complex enough to care about caching or not.

This is an umbrella bug to track investigation into other options and alternatives. In particular, I suspect the following:

  • The framework could be doing more to hint whether or not it will draw the same picture, or even reuse the same picture instance, to the rasterizer.
  • The raster cache could have a prospective rather than a retrospective heuristic (e.g. if it had the right hints from the framework, it wouldn't need to check whether the picture had been rasterized 3 times or not).
  • Hints could probably be propagated up the layer tree to fast-path layer caching and avoid re-rasterization of children.
  • Some better metric could be used for sub-pictures that are some combination of
    • expensive to append to a display list
    • expensive to rasterize

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.perf: speedPerformance issues related to (mostly rendering) speed

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions