Cities: Skylines

Cities: Skylines

[DEPRECATED] Tree Anarchy 1.3.6
Quistar  [developer] 16 Jul, 2021 @ 5:58am
Performance & RAM usage of this mod
Performance
When I was writing this mod, special attention was paid to retain Colossal Order's tree rendering framework, because it is as efficient as it can get without access to Intrinsic codes (SIMD special instructions such as SSE SSE2 AVX AVX2 etc). It is a very bad idea to run prefixes and posfixes when using Harmony patches on the rendering framework, thus I chose to install special function calls within the architecture to ensure minimal impact on performance.

Serialization Performance (Custom Tree Limit set to 1 million trees)
Loading tree data (Deserialization) takes around 90ms (0.09 seconds)
Loading Old Unlimited tree data takes around 5ms (0.005 seconds)
Saving tree data (Serialization) takes around 95ms (0.095 seconds)
Loading and saving tree data with this mod takes longer compared to old unlimited tree format due to the reason that this mod compresses/decompresses the datas

RAM utilization
Custom Tree Limit ram utilization
Colossal Order's default tree limit is 262144, and with each tree instance taking up approximately 14 bytes of ram, the default framework uses approximately 3.6MB of ram.
With my mod, the RAM utilization is 14 bytes * Custom tree limit, thus if you set the tree limit to 1 million, then my mod will use up approximately 14MB of ram.

Random tree rotation
Random tree rotation utilizes around 4k of memory for Quaternion storage.

Tree resizing
Tree resizing also stores the scale factor for every tree, and the RAM allocated is 4 bytes per tree. With custom tree limit set to 1 million, this will use up approximately 4MB of ram.
Last edited by Quistar; 19 Jul, 2021 @ 7:10am