Skip to content

Consider allowing raster cache entries to survive 1+ frames without usage #87827

@jonahwilliams

Description

@jonahwilliams

Currently the raster cache clears all entries that have not been used at the end of the frame. In the case of SVGs, this can lead to repeated rendering jank in scenarios like a scrolling list or tabbar view where the same picture (pending flutter_svg fix) is continually re-rasterized as a user interacts with the application.

For especially complex pictures (#87826), we should support some method of keeping the cache entry alive past one frame. Some ideas:

  • We could tune a threshold for lack of access. Probably flaky, risk optimizing for benchmarks.
  • We could tie the entry to the lifetime of the engine Picture object. If the picture isn't disposed, then the framework must be keeping it alive intentionally
  • We could provide a new API that returned some sort of raster handle that the framework could manage

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions