Skip to content

Bad PlatformView performance on Android #53532

Open

Description

@t-artikov

I'm trying to integrate native OpenGL rendering by exposing GLSurfaceView as PlatformView.
On my Nexus 6P (Android 8.1) the performance is quite bad, rendering is not smooth.

Here is a complete example:
https://github.com/t-artikov/flutter_platform_view_test

flutter doctor -v
[✓] Flutter (Channel master, v1.16.4-pre.18, on Linux, locale en_US.UTF-8)
    • Flutter version 1.16.4-pre.18 at /home/timur/flutter
    • Framework revision c8efcb632b (2 days ago), 2020-03-27 22:31:01 -0700
    • Engine revision 3ee9e3d378
    • Dart version 2.8.0 (build 2.8.0-dev.18.0 1402e8e1a4)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/timur/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /home/timur/Android/Sdk
    • Java binary at: /snap/android-studio/84/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Linux toolchain - develop for Linux desktop
    • clang++ 9.0.0
    • GNU Make 4.1

[✓] Android Studio (version 3.6)
    • Android Studio at /snap/android-studio/84/android-studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.43.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.8.1

[✓] Connected device (2 available)
    • Nexus 6P • ENU7N15B06000345 • android-arm64 • Android 8.1.0 (API 27)
    • Linux    • Linux            • linux-x64     • Linux

• No issues found!  

Observatory timeline

Activity

  1. t-artikov commented on Mar 29, 2020

    @t-artikov
    Author

    #53533 can be a solution in some cases.

  2. TahaTesser commented on Mar 30, 2020

    @TahaTesser
    Contributor

    Galaxy M30 (Android 10)

    Screenshot_20200330-194454

  3. added
    a: platform-viewsEmbedding Android/iOS views in Flutter apps
    engineflutter/engine related. See also e: labels.
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    platform-androidAndroid applications specifically
    on Mar 30, 2020
  4. t-artikov commented on Mar 30, 2020

    @t-artikov
    Author

    @TahaTesser
    Thanks.
    It's better to measure performance in profile mode rather than debug.
    Also the Flutter performance overlay is not the only criterion. It is possible that the Flutter UI is rendered smoothly, but the PlatformView content is not. Therefore, there is an additional performance indicator - a rectangle in the lower left corner. When performance is good, it should be solid purple.

  5. t-artikov commented on Mar 30, 2020

    @t-artikov
    Author
  6. t-artikov commented on Apr 4, 2020

    @t-artikov
    Author

    Observatory timeline added.

  7. added
    P2Important issues not at the top of the work list
    on Jun 15, 2020
  8. added
    perf: speedPerformance issues related to (mostly rendering) speed
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    on Dec 4, 2020
  9. added 4 commits that reference this issue on Jun 25, 2024
  10. added a commit that references this issue on Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsc: performanceRelates to speed or footprint issues (see "perf:" labels)c: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.perf: speedPerformance issues related to (mostly rendering) speedplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions