Jetsam 在 iOS 上杀死了 WebGL 应用程序

Jetsam kills WebGL application on iOS

我目前正在努力解决 Web 上 webgl 应用程序内部的内存管理问题,仅在 iOS 上。

我不断收到以下错误消息:

Application 'UIKitApplication:com.apple.Preferences[0xa7c1]' was killed by jetsam.

我明白 Jetsam is the system process responsible for memory management, but the crash occurs while the browser uses around 25% of the device's RAM, which is not that high. I don't have any other open application while running my webGL content. What I don't understand is what Taun Chapman 说:

Jetsam monitors memory use and kills applications which are not good memory citizens. A good memory citizen is an application which is willing to give back memory when asked and does not keep asking for more memory.

好吧,应用程序在短时间内需要更多内存(使用 worker 解压缩 3D 模型时),没有它我无法继续我的应用程序!它在这些特定时间崩溃了。

此外,我认为我的应用程序中存在一些内存泄漏,according to Chrome DevTools我目前正在尝试修复。但是浏览器本身似乎也有一些漏洞。因此,修复我的只会延迟不可避免的事情。

我知道下面的问题很奇怪,或者不合适,但是你知道jetsam "limit" 是否可以增加吗?或者,如果您可以在当前 运行 WebGL 应用程序上添加例外情况?

供您参考,我使用 Three.js WebGL library and the zip.js library 压缩我的 3D 模型。

是的,我已经阅读了以下问题:Why does simple website crash on mobile (iOS Safari and Chrome, at least)?,但问题并非来自我的 CSS。

iOS 的 10.3.2 版本(5 月 15 日发布)降低了 Jetsam 的攻击性,或者至少,内存得到了更好的处理。

https://support.apple.com/en-gb/HT207798