WKWebView memory budget

What exactly is the memory budget of the WKWebView and is it possible to increase the amount of memory it can consume? I am finding that when I attempt to load a large WebGL scene into the WKWebView I am getting the webViewWebContentProcessDidTerminate callback and unable to load my scene. Is it possible to keep the WebContent process from quitting?

It is not possible to increase the limit.
Also: "The memory limit" is not a set number. It depends on things like total device RAM, current system load, etc.

You *should* get a memory pressure warning as you approach/surpass the limit, though.

We have the problem that our canvas web app seems to reach that memory limit much more often when its run in our iOS app. When its run in safari we have not seen issues reported like that. There must be a difference in memory allocation between an app wkwebview process and a safari wkwebview process. And if there isn't one what is safari doing to recover from those memory issues.

Cheers Thomas

Same here. My webview application is crashing with the same error and the reason seems to be that it runs out of vram. This happens at random when WebGL scenes are being loaded, sometimes it does, sometimes it does not. I am not getting a warning though. It is working fine in the mac simulator, where there probably is more vram available

WKWebView memory budget
 
 
Q