RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

NetMessages allocate a lot

Open metalgearsloth opened this issue 1 year ago • 1 comments

https://github.com/space-wizards/RobustToolbox/pull/4582 is a bandaid but ideally we would just have stackalloced Span or something and write into NetBuffer without 1 morbillion allocations and not have to use RecycleableIOMemoryStream.

metalgearsloth avatar Nov 27 '23 23:11 metalgearsloth

Also realistically we probably need to pass in the netmessage directly to PVS for writing comp states probably which would also avoid boxing the componentstate structs among other things.

metalgearsloth avatar Dec 01 '23 23:12 metalgearsloth