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

Webview lag on android #74894

Open
fbeccaceci opened this issue Jan 28, 2021 · 5 comments
Open

Webview lag on android #74894

fbeccaceci opened this issue Jan 28, 2021 · 5 comments
Labels
c: performance Relates to speed or footprint issues (see "perf:" labels) p: webview The WebView plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. 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

@fbeccaceci
Copy link

Details

Target Platform: android
Devices: Huawei p20 lite (android version 9)

I'm having a problem using the official webview plugin on android (on ios everything is fine), the webview really lag if you scroll, i also tried enabling Hybrid composition, this solve the problem with the webview which works fine but make the entire app lag

there is my code: https://gist.github.com/fbeccaceci/f706024fe311470336ed516531fbbe4b

virtualDisplay.mp4
HybridComposition.mp4

Logs

Logs

Flutter doctor output:
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale it-IT)
• Flutter version 1.22.5 at /Users/ipla/flutter
• Framework revision 7891006 (7 settimane fa), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/ipla/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/ipla/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0

[!] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] IntelliJ IDEA Ultimate Edition (version 2020.2.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1

[✓] Connected device (1 available)
• ANE LX1 (mobile) • 9WV7N18903002636 • android-arm64 • Android 9 (API 28)
! Error: iPhone di Fabrizio is not connected. Xcode will continue when iPhone di Fabrizio is connected. (code -13)

! Doctor found issues in 3 categories.

@fbeccaceci fbeccaceci added the from: performance template Issues created via a performance issue template label Jan 28, 2021
@pedromassangocode pedromassangocode removed the from: performance template Issues created via a performance issue template label Jan 29, 2021
@pedromassangocode
Copy link

Hi @fbeccaceci
Just by looking at your videos I cannot notice any lag. Can you please be more clear at which point it lags?
It would probably be better to verify performance issues using DevTools!
Thank you

@pedromassangocode pedromassangocode added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Jan 29, 2021
@fbeccaceci
Copy link
Author

Focus on the scroll of the website, in the Hybrid Composition one it's smooth as it's supposed to be, on the Virtual display one it's laggy and definitely not smooth. At the same time if you focus on the drawer animation it's fine in the virtual display example, while with hybrid composition enable it is noticeable under 60 fps

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 29, 2021
@pedromassangocode pedromassangocode added p: first party p: webview The WebView plugin perf: speed Performance issues related to (mostly rendering) speed platform-android Android applications specifically c: performance Relates to speed or footprint issues (see "perf:" labels) and removed in triage Presently being triaged by the triage team labels Feb 1, 2021
@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label Feb 1, 2021
@eness
Copy link

eness commented Mar 7, 2021

same problem here. webview lags when you scroll the page down or up, even the DOM is not that complicated or so long. The smoothing experience definitely not same when comparing to the native scrolling functionality.

@Hixie Hixie added the plugin label Mar 10, 2021
@pruthvi-itribe
Copy link

Any update on this ?

@pruthvi-itribe
Copy link

We have embedded a react app using webview in flutter and can see the lag where its default scroll of html css elements but its gives very bad experience to users in app. whereas web version of this is working fine in mobiles.
https://user-images.githubusercontent.com/92719921/206704806-fe1e1333-8388-4f38-b3ec-5f399f529d0d.mp4

@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
@Hixie Hixie removed the plugin label Jul 6, 2023
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: performance Relates to speed or footprint issues (see "perf:" labels) p: webview The WebView plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. 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

7 participants