Skip to content

Suggestions on performaace boost #3

@Vectorial1024

Description

@Vectorial1024

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions