Skip to content

[Impeller] Tessellation overhead causes regression on some animations. #134432

@HayesGordon

Description

@HayesGordon

Details

Hi there! Running into a severe performance regression with Impeller when running a Rive animation.

This was first reported by a customer who did not experience any issues using the Rive Editor (built with Skia) but then ran into issues when building to device (Impeller).

I've created a reproducible example at this repository.

This is the complete animation, and I'm not sure what exactly is causing the issues. Could be something with paths/painting.

Video demonstrating the performance on macOS Impeller (profile build) on Master Flutter channel:

CleanShot.2023-09-11.at.16.43.16.mp4

Video demonstrating the performance on iOS Impeller (debug build, simulator) on Master Flutter channel:

CleanShot.2023-09-11.at.16.58.24.mp4

A Skia build runs at about 9ms (macOS, profile) and 16ms (iOS debug on simulator) per frame on the raster thread. In the above videos Impeller is pushing 60ms.

This appears to have been introduced recently - Impeller for macOS with version 3.10.6, for example, did not have this issue. However, v3.10.6 for iOS (simulator and physical device) does have the performance issue.

I've only ran tests for iOS and macOS.

Flutter doctor:

[✓] Flutter (Channel master, 3.14.0-14.0.pre.215, on macOS 13.5.1 22G90
    darwin-arm64, locale en-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.82.0)
[✓] Connected device (3 available)
[✓] Network resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)e: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions