KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
318 stars 40 forks source link

Terrible performance on Android #71

Closed xmeaindes closed 5 months ago

xmeaindes commented 5 months ago

I ran an example on Google Pixel, which has absolutely no problems in Chrome. WebView is very slow

https://github.com/KevinnZou/compose-webview-multiplatform/assets/126922273/c76df869-4adf-4b72-95dd-2e8cd5a185fc

Version: 1.7.8

flymedllva commented 5 months ago

The problem seems to be related to this.setLayerType(View.LAYER_TYPE_SOFTWARE, null) added recently https://github.com/KevinnZou/compose-webview-multiplatform/pull/65. With or without this.setLayerType(View.LAYER_TYPE_HARDWARE, null) everything works correctly

KevinnZou commented 5 months ago

@flymedllva Thanks for your help! @xmeaindes In version 1.7.8, I have set the Software Layer as the default solution to address the https://github.com/KevinnZou/compose-webview-multiplatform/issues/64. I will switch to Hardware Layer and release the 1.8.0 today. Sorry for the inconvenience caused.

KevinnZou commented 5 months ago

@xmeaindes It has been fixed in version 1.8.0. Please have a try and let me know if you encounter any problems.