SpaceWizards.Lidgren.Network
SpaceWizards.Lidgren.Network copied to clipboard
The pooling implementation is lacking
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.