Why android webview is much slower than the native android browser?
Asked Answered
L

1

14

In my application, i have some external urls to load, for which i am using a custom webview. but the performance of this webview is very very slow. If i open the same url in native android browser, it works fine. but in the webview, it just takes a lot of time to load the page. Is there anyway that the performance of a webview can be enhanced in terms of loading a webpage time? Help is always appreciated.

Leatherjacket answered 9/8, 2011 at 5:13 Comment(3)
Are you testing on an emulator or on a device?Repudiate
On both...Web View is slower on both as compared to native android browser.Leatherjacket
It's a little late now to talk about it but worth to see: github.com/delight-im/Android-AdvancedWebViewCupronickel
A
6

Usama, WebViews will be little slower than the browser as here every activity has to have a callback to the Android app layer.

Having said that, see if you can disable javascript (if it's not used in your app) and more importantly check the caching behavior in the webview that has been set. WebSettings has some methods related to caching like - setAppCacheEnabled, setAppCacheMaxSize, setCacheMode etc.

setDatabaseEnabled, javascrpt, loadImagesAutomatically are other properties that might impact the load time.

Aggappera answered 27/11, 2011 at 7:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.