I have many (5-10) WebViews that are shown simultaneously (e.g. as a “carousel” similar to stock Gallery). Remote web sites are loaded into these WebViews (not local html files). The web sites are quite complex – they have lots of javascript, images, may have some flash…
When app starts, all WebViews start loading/layouting their content and running javascript – all this takes quite some time. On the other hand, app is very responsive when the WebViews are loading – scrolling and other UI stuff is really smooth – CPU is definitely not under pressure.
- So is it possible to make those views load in parallel? I think my app will benefit greatly from loading WebViews in parallel.
- Also, maybe there is a way to do javascript, load and layout manually by reusing WebView source code?
Answering my own question:
Instead, I used WebChromeClient#shouldInterceptRequest to cache as much resources as possible, which improved loading times quite a bit.