1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

Improved performance (very slightly) when batch recycling incoming messages

This commit is contained in:
lidgren
2011-09-25 10:38:57 +00:00
parent 9e3104f5da
commit 36bf73bfbe
5 changed files with 60 additions and 15 deletions

View File

@@ -146,8 +146,13 @@ namespace Lidgren.Network
{
StringBuilder bdr = new StringBuilder();
bdr.AppendLine(m_peer.ConnectionsCount.ToString() + " connections");
#if DEBUG || USE_RELEASE_STATISTICS
bdr.AppendLine("Sent " + m_sentBytes + " bytes in " + m_sentMessages + " messages in " + m_sentPackets + " packets");
bdr.AppendLine("Received " + m_receivedBytes + " bytes in " + m_receivedMessages + " messages in " + m_receivedPackets + " packets");
#else
bdr.AppendLine("Sent (n/a) bytes in (n/a) messages in (n/a) packets");
bdr.AppendLine("Received (n/a) bytes in (n/a) messages in (n/a) packets");
#endif
bdr.AppendLine("Storage allocated " + m_bytesAllocated + " bytes");
bdr.AppendLine("Recycled pool " + m_peer.m_storagePoolBytes + " bytes");
return bdr.ToString();