question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initial Webview load very slow, can we pre-cache?

See original GitHub issue

Is your feature request related to a problem? If so, Please describe.

Recently, on 10.9.0, I’ve noticed that our Webview loads very slowly (on the order of ~8 seconds, when hitting a localhost address from my iOS simulator). This didn’t seem to be a problem in the past, and neither the content we are loading nor our Webview component usage have changed. Is it possible there has been a regression? I have noticed that subsequent loads seem to be much faster (~1-2 seconds), which makes me think that the caching behavior is very helpful for performance.

Describe the solutions you came up with

I was wondering if you had any other solutions off the top of your head that might help performance. Alternatively, would it be possible to pre-cache/pre-load the page content before the Webview is rendered, so on initial render it could render from a cache and our users wouldn’t have to wait 10 seconds for load? I would like to avoid doing something like rendering an invisible Webview on app load and displaying it when needed.

Additional context

Please let me know if there’s any other information that might be helpful. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:31
  • Comments:39

github_iconTop GitHub Comments

19reactions
Liqiankuncommented, Oct 8, 2020
 <WebView cacheEnabled={false} />

This works for me.

4reactions
Hamza-Ali333commented, Feb 22, 2022

Yeah. Me too facing the same. It’s very slow for first time.

Agreed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Webview loading slow for the first time - Stack Overflow
For the first time, the whole webView is being loaded without the cache. The second time its loading from the cache as well...
Read more >
Way to WebView Prefetch / Prerender / Precache HTML Page ...
Hi all, I'd like to know if there is any way to improve the loading speed on a WebView by prefetching / caching...
Read more >
Browser slow load after update to 2017 - Essential Objects
After updating from EO.Total 16.2.93 to EO.Total 17.0.40 my initial web browser load time increased from about 2 seconds to 15 seconds.
Read more >
Fast playback with audio and video preload - web.dev
In this article I'll explore techniques you can use to accelerate your audio and video playback by actively preloading resources depending ...
Read more >
Using Service Workers - Web APIs | MDN
Service workers fix these issues. Using a service worker you can set an app up to use cached assets first, thus providing a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found