[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad PlatformView performance on Android #53532

Open
t-artikov opened this issue Mar 29, 2020 · 5 comments
Open

Bad PlatformView performance on Android #53532

t-artikov opened this issue Mar 29, 2020 · 5 comments
Labels
a: platform-views Embedding Android/iOS views in Flutter apps c: performance Relates to speed or footprint issues (see "perf:" labels) c: rendering UI glitches reported at the engine/skia rendering level engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list perf: speed Performance issues related to (mostly rendering) speed platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@t-artikov
Copy link
t-artikov commented Mar 29, 2020

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

@t-artikov
Copy link
Author

#53533 can be a solution in some cases.

@TahaTesser
Copy link
Member
TahaTesser commented Mar 30, 2020

Galaxy M30 (Android 10)

Screenshot_20200330-194454

@TahaTesser TahaTesser added a: platform-views Embedding Android/iOS views in Flutter apps engine flutter/engine repository. See also e: labels. c: performance Relates to speed or footprint issues (see "perf:" labels) platform-android Android applications specifically labels Mar 30, 2020
@t-artikov
Copy link
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.

@t-artikov
Copy link
Author

@amirh, @mklim

@t-artikov
Copy link
Author

Observatory timeline added.

@chinmaygarde chinmaygarde added the P2 Important issues not at the top of the work list label Jun 15, 2020
@pedromassangocode pedromassangocode added passed first triage perf: speed Performance issues related to (mostly rendering) speed c: rendering UI glitches reported at the engine/skia rendering level labels Dec 4, 2020
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jun 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jun 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jun 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Jun 25, 2024
auto-submit bot pushed a commit that referenced this issue Jun 25, 2024
…150762)

flutter/engine@be7db94...afa7ce1

2024-06-25 skia-flutter-autoroll@skia.org Roll Dart SDK from bb18127b2a8e to b5fc85cfcf1b (1 revision) (flutter/engine#53552)
2024-06-25 skia-flutter-autoroll@skia.org Roll Skia from 5feca3095719 to 335200e57c26 (1 revision) (flutter/engine#53549)
2024-06-25 skia-flutter-autoroll@skia.org Roll Dart SDK from c187d4b3ec88 to bb18127b2a8e (1 revision) (flutter/engine#53547)
2024-06-25 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from _6HNhJ6G59VMceKoN... to WUN7NQK04NjF9fRmf... (flutter/engine#53545)
2024-06-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Re-re-land "Upgrade all[most] androidx dependencies to latest" (#53532)" (flutter/engine#53546)
2024-06-25 bdero@google.com Bump impeller-cmake-example (flutter/engine#53538)
2024-06-24 skia-flutter-autoroll@skia.org Roll Skia from e20c8b0bac0c to 5feca3095719 (1 revision) (flutter/engine#53544)
2024-06-24 ditman@gmail.com [web] Reland "Fix focus management for text fields (#51009)" (flutter/engine#53537)
2024-06-24 skia-flutter-autoroll@skia.org Roll Dart SDK from 5df89347bddf to c187d4b3ec88 (1 revision) (flutter/engine#53542)
2024-06-24 chris@bracken.jp [macOS] Generate universal gen_snapshots (flutter/engine#53524)
2024-06-24 34871572+gmackall@users.noreply.github.com Re-re-land "Upgrade all[most] androidx dependencies to latest" (flutter/engine#53532)
2024-06-24 skia-flutter-autoroll@skia.org Roll Skia from 1948fd53e280 to e20c8b0bac0c (1 revision) (flutter/engine#53540)
2024-06-24 skia-flutter-autoroll@skia.org Roll Skia from 0fa58b6ddba0 to 1948fd53e280 (2 revisions) (flutter/engine#53536)
2024-06-24 skia-flutter-autoroll@skia.org Roll Skia from ea84df425483 to 0fa58b6ddba0 (3 revisions) (flutter/engine#53535)
2024-06-24 30870216+gaaclarke@users.noreply.github.com [Impeller] added a fallback that will make sure the blur fragment shader doesn't overflow (flutter/engine#53466)
2024-06-24 jonnywang@google.com [fuchsia] Update Fuchsia API level to 19 (flutter/engine#53494)
2024-06-24 skia-flutter-autoroll@skia.org Roll Dart SDK from 95470b2cac1f to 5df89347bddf (1 revision) (flutter/engine#53534)
2024-06-24 skia-flutter-autoroll@skia.org Roll Skia from f6b4344d73cc to ea84df425483 (1 revision) (flutter/engine#53531)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from _6HNhJ6G59VM to WUN7NQK04NjF

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jimgraham@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: platform-views Embedding Android/iOS views in Flutter apps c: performance Relates to speed or footprint issues (see "perf:" labels) c: rendering UI glitches reported at the engine/skia rendering level engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list perf: speed Performance issues related to (mostly rendering) speed platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests

5 participants