Performance: Pre-calculate or cache MyDefinitionId.ToString results
Reported – Awaiting fix
Game version: 1.200.032
Method: MyDefinitionId.ToString
This method is called frequently, it also allocates memory. There are only 1000-1500 distinct definition IDs to format (depending on mods), so these are cacheable without expiration.
Measured 1.9% CPU load just on this formatting method on a multiplayer server, which is too much for basically nothing.
Hello, Viktor!
Thank you for letting us know about this. I have reported this internally.
Kind Regards
Laura, QA Department
Hello, Viktor!
Thank you for letting us know about this. I have reported this internally.
Kind Regards
Laura, QA Department
Hello, Viktor!
I haven't found situation where it can drain 1.9% CPU. How do you measure?
If you use dot.Trace, could you please attach file?
Kind Regards
Gregory Smirnov
Hello, Viktor!
I haven't found situation where it can drain 1.9% CPU. How do you measure?
If you use dot.Trace, could you please attach file?
Kind Regards
Gregory Smirnov
Replies have been locked on this page!