0

WebView on Nexus 7 (ME370T) with Android 4.4.2 loads long URLs very slow. For example URL below may be loaded in 84s., but may not be loaded at all (WebView just hangs with blank page). Is there any workaround for this issue?

webView.loadUrl("https://www.google.com/#q=some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this+some+this");

[EDIT]
The page loading speed unstable and it doesn't depend much on URL length, it does depend on scheme - http loads faster than https.
Another thing: I've got another Nexus 7 with 4.3 and it loads the page instantly.


[EDIT]
It looks like Nexus 7 running 4.4.2 become very sensitive to Wi-Fi quality. I have plenty of active Wi-Fi networks around me at daytime and it takes ~5mins for WebView to load the page (or it may not load it at all), but when I try at night time - the page opens in 5s., almost like on 4.3

surlac
  • 2,961
  • 2
  • 22
  • 31
  • I've never seen anything like that. Are you really sure that URL length is the issue, as opposed to page size, connection speed, etc? To test, try loading two pages that are the same, such as https://www.google.com compared to https://www.google.com/?throwaway=blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa – Luke May 15 '14 at 22:45
  • On 4.4.2 it loads https pages very slowly, or not loading at all (both long and short URLs). I've got another Nexus 7 with 4.3, and it loads the page instantly. – surlac May 16 '14 at 00:32
  • Hey! you may want to look at this: http://www.mobilexweb.com/blog/android-4-4-kitkat-browser-chrome-webview Looks like there was an update to webview, not too sure if this is your issue or not, but at least worth a read – Lauren Grimes May 16 '14 at 02:10
  • https is probably slower than http because of the SSL handshake (http://stackoverflow.com/questions/149274/http-vs-https-performance). Attaching DevTools to the 4.4 WebView (https://developer.chrome.com/devtools/docs/remote-debugging) will let you see the timeline, which should help you identify any obvious problems. – marcin.kosiba May 16 '14 at 14:06
  • thanks guys! I read the articles and debugged the webview with DevTools, it provided me additional important info. I've made some experiments: it looks like Nexus 7 running 4.4.2 become very sensitive to Wi-Fi quality. I have plenty of active Wi-Fi networks around me at daytime and it takes ~5mins for WebView to load the page (or it may not load it at all), but when I try at night time - the page opens in 5s., almost like on 4.3. – surlac May 17 '14 at 03:14

0 Answers0