diff --git a/PoolOpt/PoolOpt.cs b/PoolOpt/PoolOpt.cs index 44a5a2e..fc46a0b 100644 --- a/PoolOpt/PoolOpt.cs +++ b/PoolOpt/PoolOpt.cs @@ -273,7 +273,6 @@ public class PoolOptPatch : BaseUnityPlugin return true; } - Logger.LogDebug($"Old size = {cursor}. Old recycle size = {recycleCursor}"); cursor = pos + 1; Array.Sort(recycle, 0, recycleCursor); var idx = Array.BinarySearch(recycle, 0, recycleCursor, pos + 1); diff --git a/PoolOpt/PoolOpt.csproj b/PoolOpt/PoolOpt.csproj index 27f7b05..808e500 100644 --- a/PoolOpt/PoolOpt.csproj +++ b/PoolOpt/PoolOpt.csproj @@ -5,7 +5,7 @@ PoolOpt org.soardev.poolopt DSP MOD - PoolOpt - 0.1.0 + 0.9.0 true latest diff --git a/PoolOpt/README.md b/PoolOpt/README.md index 7979e72..dc84fcc 100644 --- a/PoolOpt/README.md +++ b/PoolOpt/README.md @@ -3,6 +3,10 @@ #### Optimize memory pools on loading gamesaves #### 加载游戏存档时优化内存池的使用 +# Notes +* Does not optimize some rarely uses pools, mostly UI related. +* Does not optimize solar sails' pool, please use button on dyson sphere panel from original game to clean it up. + # Mechanism * The game uses a lot of memory pools in array to store data, sizes and capacities of these pools are increased on demand but never decreased, even most data inside are not used due to dismantle objects. Unused slot IDs are save in recycle array for reuse. * Some game functions loop through all allocated slots in the pool, so the size of the pool will affect the performance. @@ -11,6 +15,10 @@ # TODO * Remove the unused slots from middle of the pool, which leads to ID change for stored objects, needs more investigation. +# 说明 +* 不会优化一些很少使用的内存池,主要是UI相关的。 +* 不会优化太阳帆的内存池,请使用原版游戏中的戴森球面板上的按钮进行清理。 + # 原理 * 游戏使用了大量的内存池数组来存储数据,这些内存池的大小和容量是只会随需求膨胀不会收缩的,即使由于拆除物体导致内部大多数数据不再使用。而未使用的槽位ID会被保存在回收数组中以供重复使用。 * 一些游戏功能会循环遍历内存池中的所有分配过的槽位,因此内存池的大小会影响性能。 diff --git a/PoolOpt/package/manifest.json b/PoolOpt/package/manifest.json index 9aa9711..c3f91eb 100644 --- a/PoolOpt/package/manifest.json +++ b/PoolOpt/package/manifest.json @@ -1,6 +1,6 @@ { "name": "PoolOpt", - "version_number": "0.1.0", + "version_number": "0.9.0", "website_url": "https://github.com/soarqin/DSP_Mods/tree/master/PoolOpt", "description": "Optimize memory pools on loading gamesaves / 加载游戏存档时优化内存池的使用", "dependencies": [