Performance: MySafeZone.IsSafe is called frequently, but not cached
Reported
Game version: 1.200.032
Problem: MySafeZone.IsSafe is called frequently, but its result is not cached.
It badly affects multiplayer worlds with lots of active safe zones with many grids in them.
How to reproduce:
- Download and extract the test world (OneDrive, due to its size):
https://1drv.ms/u/s!AqEgz8G_d8TSh8wPzLoPp_dQDBRb7g?e=eBhsuv - Load the test world into DS.
- Use dotTrace to profile the above mentioned method.
Please see the profiler screenshots attached. On the multiplayer server the save file is from the admins measured 8.44ms / simulation frame (!) spent on safe zones, over 86% of that is spent in IsSafe.
Please see the related patch in the Performance Improvements plugin on how to fix the above.
Search for: MySafeZonePatch
Hello, Viktor,
thanks for letting us know. Issue was reported internally.
Kind Regards
Keen Software House: QA Department
Hello, Viktor,
thanks for letting us know. Issue was reported internally.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!