RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Interning serv4 strings

Open metalgearsloth opened this issue 1 year ago • 2 comments

So at one point I checked and there was a lot of memory allocated for stuff like ambientsound strings. Might be better to either just globally use string interning for the datafields or alternatively make a separate serializer for it.

metalgearsloth avatar Mar 25 '24 00:03 metalgearsloth

As this is sourcegenned now we could likely just add a new datafield attribute or property that tells the serializer to call string.Intern() on the string.

moonheart08 avatar Mar 25 '24 01:03 moonheart08

Apparently string.Intern is omega-slow and FrozenDictionary might end up better so would just need to make a new manager for it and then lock it at some point.

metalgearsloth avatar Jul 15 '24 23:07 metalgearsloth