SpaceWizards.Lidgren.Network icon indicating copy to clipboard operation
SpaceWizards.Lidgren.Network copied to clipboard

The pooling implementation is lacking

Open metalgearsloth opened this issue 7 months ago • 0 comments

Okay so I did some digging around and noticed some things:

  • NetBuffer / NetMessage have recycling and the data is dumped back into a pool, however the default size is tiny and it continuously re-allocates. This is probably better off just using its own created ArrayPool instead which would dramatically reduce the heap allocations for Lidgren for us.

  • Delayed packets allocates a lot and should also be using GetStorage.

metalgearsloth avatar Nov 20 '23 03:11 metalgearsloth