Patch from Johan: LibSL updated to the latest revision (1568) and all packets are now

recycled to improve performance and memory usage.
This commit is contained in:
Adam Johnson
2007-12-28 08:51:39 +00:00
parent 8cd72beb86
commit 79496381fc
11 changed files with 308 additions and 242 deletions

View File

@@ -83,7 +83,9 @@ namespace OpenSim.Region.Environment.Scenes
private void statsHeartBeat(object sender, EventArgs e)
{
m_report.Enabled = false;
SimStatsPacket statpack = new SimStatsPacket();
SimStatsPacket statpack = (SimStatsPacket) PacketPool.Instance.GetPacket(PacketType.SimStats);
// TODO: don't create new blocks if recycling an old packet
SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[11];
statpack.Region = new SimStatsPacket.RegionBlock();
statpack.Region.RegionX = ReportingRegion.RegionLocX;
@@ -241,4 +243,4 @@ namespace OpenSim.Region.Environment.Scenes
m_unAckedBytes += numBytes;
}
}
}
}