From 79496381fc68cbd30ff5a95d1f05fcb18c6b1a93 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 28 Dec 2007 08:51:39 +0000 Subject: Patch from Johan: LibSL updated to the latest revision (1568) and all packets are now recycled to improve performance and memory usage. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 5b74c9b..94b6797 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -74,13 +74,11 @@ namespace OpenSim.Region.Environment.Scenes { get { return m_rootPart.RotationOffset; } } - public LLUUID GroupID { get { return m_rootPart.GroupID; } set { m_rootPart.GroupID = value; } } - /// /// /// @@ -638,7 +636,9 @@ namespace OpenSim.Region.Environment.Scenes public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) { //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); - ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket(); + ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); + // TODO: don't create new blocks if recycling an old packet + ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); objPropDB.RequestFlags = RequestFlags; objPropDB.ObjectID = RootPart.UUID; @@ -1045,7 +1045,9 @@ namespace OpenSim.Region.Environment.Scenes /// public void GetProperites(IClientAPI client) { - ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); + ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); + // TODO: don't create new blocks if recycling an old packet + proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); proper.ObjectData[0].ItemID = LLUUID.Zero; @@ -1297,6 +1299,7 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.PhysActor.IsPhysical); bool UsePhysics = ((m_rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); + } } @@ -1737,4 +1740,4 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.ApplyPhysics(); } } -} \ No newline at end of file +} -- cgit v1.1