I am using Cesium JS in Ionic 4 and it consumes a lot of memory. I am currently testing with iOS and eventually end up in a state where the WKWebView consumes too much memory and is killed by the kernel. From a user perspective this shows them the classic ‘white screen of death’. There may be garbage collection issues with WKWebView and memory leaks within Cesium itself but the horizon of addressing either of those is further out than my current need. Has anyone considered attempts to handle the case where the WebContent processes dies? I’m wondering if it could possibly be monitored from a Cordova plugin and restarted. The process which represents the App itself is still running so presumably I still have some ability to impact what is going on. Basically I am resigning myself to the idea the white screens will happen at this point in time and I just want the webview to restart if possible.
Proof the OS is killing it:
kernel 2283389.257 memorystatus: killing_highwater_process pid 3423 [com.apple.WebKit.WebContent] (highwater 10) - memorystatus_available_pages: 27168