I would like to increase the scrolling speed of the web pages that I read in the Android app WebView.

Asked 2 years ago, Updated 2 years ago, 133 views

We are currently developing an Android app.
I am using WebView to display the smartphone version of the web page.
I get confused when I scroll through the loaded web page.

I found an article on the Internet that says "android:hardwareAccelerated="true" will improve and
I tried it, but I still scroll a little and get confused.

Are there any other countermeasures?

Thank you for your cooperation.

android webview

2022-09-30 19:35

1 Answers

If it's properly HardwareRenderer, it's not (theoretically) that the WebView drawing itself causes scrolling.

Because WebView works
·Scroll, enlarge, and shrink tiles with GPU (HWRender)
·Draw the contents of the tile with Skia
This is because even though the contents of the page may not be displayed, scrolling tiles does not matter whether or not the contents are displayed.

Therefore, the cause of scrolling is
1. Something is going on in the UI thread
2.Other CPU proprietary processing is occurring
3.
I can't keep up with below SurfaceFlinger (although it's almost none these days) 4. GPU processing is not up to speed (depending on the situation)
etc.

3.4. You can ignore it.
3. can be analyzed in systrace, but if this is the cause, the app cannot solve it.
4. can be analyzed by Adreno Profiler, etc., but this is probably not the cause if you are not doing intense GPU processing.

1. can be parsed in traceview or systrace.
2. can be parsed with the top command or with the systrace.

Both tools are analyzed on the official website.
https://developer.android.com/studio/profile/traceview.html
https://developer.android.com/studio/profile/systrace.html

By the way, if the development is carried out by Emulator,
The product is equipped with Chrome from GMS, and WebView is also used inside Chrome, but
Emulator should use AOSP's WebView, so I think the behavior will change a little.


2022-09-30 19:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.