-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi there
I was wandering around and noticed comments saying that this mod greatly reduced fps. As smoene who have played RW + developed RW mods with a potato PC, I can share a bit of my experence in dealing with this.
Understandably, this mod deals with numbers freqently, having to print them and what not. One possible performance black hole is converting ints to strings. It turns out, doing .ToString() is too slow, and using .ToStringCached() under Verse.GenString is much faster, at least for regular usages. This can greatly speed up fps when the UI is shown.
The suggestion would then be to convert the implicit int -> string casts/expliciit .ToString() calls to explicit .ToStringCached() calls
Another way to improve UI ppformance is to use C# StringBuilder instead of just concatenating strings, but this will require more effort.