Skip to content

Automatic/scalable shader warm-up #32170

@liyuqian

Description

@liyuqian

Current status: #32170 (comment)


Although Flutter's current shader warm-up process is theoretically able to eliminate all shader compilation jank, it requires too much expertise and time to find all draw operations for such process.

We shall find a more automatic and scalable way of finding those draw operations to compose a custom warm-up process. That should allow average developers without much Skia knowledge to eliminate the shader compilation on their own. That should also save Flutter engineers a lot of time as they'll no longer have to manually analyze the janky frame.

Note that this issue affects iOS devices more significantly than Android devices because Android has binary shader persistent cache while iOS doesn't.

We have a staged plan to roll this out, and we're actively working on it.

  • SkSL-based shader warmup
  • Test-based shader warmup
  • In the long term, we'd like to create a solution that requires 0 extra effort from developers, and handles all cases that may have never been encountered during any tests or warmups. For example, use the CPU backend when GPU backend needs warm-up.

Related issue: #813, #31881

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: crowdAffects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions