我们项目在2G内存的手机(Android&iOS)上 开车移动或触发levelsequence有大量资源的加载,容易发生崩溃。
经分析后,在开启streaming的时候,STAT_AsyncFileMemory 会增长的比较厉害,且不会下降。很容易涨到200多M。
另外我们测试STAT_AsyncFileMemory 涨上去之后,静止一段时间,没有资源加载之后,它的内存仍然不会下降。
请问下这种情况是bug吗?应该如何解决呢?
<br/>
另外,我在网上找了一些帖子,比如 刘炜 回复的 [Content removed]
找了一些开关并进行测试。测试结果如下
pakcache.Enable pakcache.UseNewTrim pakcache.MaxBlockMemory pakcache.TimeToTrim pakcache.EnableNoCaching
测试1
pakcache.Enable = false。能降低pakcachehighwater的内存,无法降低STAT_AsyncFileMemory 的内存。仍然会崩溃。
测试2
pakcache.MaxBlockMemory=20 && pakcache.TimeToTrim = 1.5 对STAT_AsyncFileMemory 没有优化作用
测试3
pakcache.UseNewTrim=1 && pakcache.EnableNoCaching=1 && pakcache.MaxBlockMemory=20 && pakcache.TimeToTrim = 1.5 对STAT_AsyncFileMemory 没有明显优化作用。
测试4 关闭streaming
r.streamingtexture 0 && r.streaming.poosize 20 && r.streaming.poolsizeformeshes 20
STAT_AsyncFileMemory 降低至个位数,但是StaticMesh、Texture显著增加。
<br/>
<br/>