willardf / Hazel-Networking

Hazel Networking is a low level networking library for C# providing connection-oriented, message-based communication via RUDP.
MIT License
385 stars 60 forks source link

Remove the PingPacket pool for a small fixed array of recent pings #52

Open willardf opened 1 year ago

willardf commented 1 year ago

Pretty simple. Under very heavy load, this will keep pings from pooling up and consuming lots of memory. I think it should still be pretty performant because the ping buffer array is very small and cache-friendly. I think anything better than this would require creating separate "Pong" packets to avoid falling back from reliable acks to ping acks.