aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-02 00:14:04 +0000
committerMelanie Thielker2009-05-02 00:14:04 +0000
commitac944def3fbea9cbad58780e3996e4c586237ab5 (patch)
tree3c8551f27e2d3ef7d19011575ab9f77464d1b08d /OpenSim/Region/ClientStack
parentAdd a tweakable for the prim queue preload (diff)
downloadopensim-SC-ac944def3fbea9cbad58780e3996e4c586237ab5.zip
opensim-SC-ac944def3fbea9cbad58780e3996e4c586237ab5.tar.gz
opensim-SC-ac944def3fbea9cbad58780e3996e4c586237ab5.tar.bz2
opensim-SC-ac944def3fbea9cbad58780e3996e4c586237ab5.tar.xz
Fix the issue that stopped the packet pool from working. Add a mechanism
to recycley data blocs within a packet. Recycle the ObjectUpdate* data blocks. Speeds up loading even more. This may mean that the packet pool is now viable.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs13
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs6
2 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 05ebcac..4acc6be 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2893,10 +2893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2893 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2893 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2894 rotation = Quaternion.Identity; 2894 rotation = Quaternion.Identity;
2895 2895
2896 ObjectUpdatePacket.ObjectDataBlock objectData = 2896 ObjectUpdatePacket.ObjectDataBlock objectData = CreatePrimUpdateBlock(primShape, flags);
2897 new ObjectUpdatePacket.ObjectDataBlock();
2898
2899 objectData = CreatePrimUpdateBlock(primShape, flags);
2900 2897
2901 objectData.ID = localID; 2898 objectData.ID = localID;
2902 objectData.FullID = objectID; 2899 objectData.FullID = objectID;
@@ -3655,7 +3652,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3655 { 3652 {
3656 byte[] bytes = new byte[60]; 3653 byte[] bytes = new byte[60];
3657 int i = 0; 3654 int i = 0;
3658 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); 3655 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = PacketPool.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
3659 3656
3660 dat.TextureEntry = new byte[0]; // AvatarTemplate.TextureEntry; 3657 dat.TextureEntry = new byte[0]; // AvatarTemplate.TextureEntry;
3661 3658
@@ -3750,7 +3747,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3750 byte[] bytes = new byte[60]; 3747 byte[] bytes = new byte[60];
3751 3748
3752 int i = 0; 3749 int i = 0;
3753 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); 3750 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = PacketPool.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
3754 dat.TextureEntry = new byte[0]; 3751 dat.TextureEntry = new byte[0];
3755 bytes[i++] = (byte)(ID % 256); 3752 bytes[i++] = (byte)(ID % 256);
3756 bytes[i++] = (byte)((ID >> 8) % 256); 3753 bytes[i++] = (byte)((ID >> 8) % 256);
@@ -3837,7 +3834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3837 /// <returns></returns> 3834 /// <returns></returns>
3838 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimitiveBaseShape primShape, uint flags) 3835 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimitiveBaseShape primShape, uint flags)
3839 { 3836 {
3840 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); 3837 ObjectUpdatePacket.ObjectDataBlock objupdate = PacketPool.GetDataBlock<ObjectUpdatePacket.ObjectDataBlock>();
3841 SetDefaultPrimPacketValues(objupdate); 3838 SetDefaultPrimPacketValues(objupdate);
3842 objupdate.UpdateFlags = flags; 3839 objupdate.UpdateFlags = flags;
3843 SetPrimPacketShapeData(objupdate, primShape); 3840 SetPrimPacketShapeData(objupdate, primShape);
@@ -3908,7 +3905,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3908 /// <returns></returns> 3905 /// <returns></returns>
3909 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) 3906 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
3910 { 3907 {
3911 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); 3908 ObjectUpdatePacket.ObjectDataBlock objdata = PacketPool.GetDataBlock<ObjectUpdatePacket.ObjectDataBlock>();
3912 // new OpenMetaverse.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); 3909 // new OpenMetaverse.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
3913 3910
3914 SetDefaultAvatarPacketValues(ref objdata); 3911 SetDefaultAvatarPacketValues(ref objdata);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 58777ab..2191ca7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -586,7 +586,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
586 return; 586 return;
587 587
588 m_NeedAck.Remove(id); 588 m_NeedAck.Remove(id);
589 PacketPool.Instance.ReturnPacket(data.Packet); 589 // We can't return this packet, it will just have to be GC'd
590 // Reason for that is that the packet may still be in the
591 // send queue, and if it gets reused things get messy!
592 //
593 // PacketPool.Instance.ReturnPacket(data.Packet);
590 m_UnackedBytes -= data.Length; 594 m_UnackedBytes -= data.Length;
591 } 595 }
592 } 596 }