diff options
author | Melanie | 2012-07-19 12:27:36 +0200 |
---|---|---|
committer | Melanie | 2012-07-19 12:27:36 +0200 |
commit | ce8b9e6c570f73a5c70dfc2b52bbb595637b717d (patch) | |
tree | 8bc9a882acb8f3eb79eca386ba021d4fb6953a42 | |
parent | Fix llSameGroup to work according to specs (diff) | |
download | opensim-SC-ce8b9e6c570f73a5c70dfc2b52bbb595637b717d.zip opensim-SC-ce8b9e6c570f73a5c70dfc2b52bbb595637b717d.tar.gz opensim-SC-ce8b9e6c570f73a5c70dfc2b52bbb595637b717d.tar.bz2 opensim-SC-ce8b9e6c570f73a5c70dfc2b52bbb595637b717d.tar.xz |
Fix slow loading of task inventory
Diffstat (limited to '')
6 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 58a65de..b1f41b8 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1177,7 +1177,7 @@ namespace OpenSim.Framework | |||
1177 | /// <param name="node"></param> | 1177 | /// <param name="node"></param> |
1178 | void SendBulkUpdateInventory(InventoryNodeBase node); | 1178 | void SendBulkUpdateInventory(InventoryNodeBase node); |
1179 | 1179 | ||
1180 | void SendXferPacket(ulong xferID, uint packet, byte[] data); | 1180 | void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory); |
1181 | 1181 | ||
1182 | void SendAbortXferPacket(ulong xferID); | 1182 | void SendAbortXferPacket(ulong xferID); |
1183 | 1183 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e6289bd..ad9074c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2122,16 +2122,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2122 | replytask.InventoryData.TaskID = taskID; | 2122 | replytask.InventoryData.TaskID = taskID; |
2123 | replytask.InventoryData.Serial = serial; | 2123 | replytask.InventoryData.Serial = serial; |
2124 | replytask.InventoryData.Filename = fileName; | 2124 | replytask.InventoryData.Filename = fileName; |
2125 | OutPacket(replytask, ThrottleOutPacketType.Asset); | 2125 | OutPacket(replytask, ThrottleOutPacketType.Task); |
2126 | } | 2126 | } |
2127 | 2127 | ||
2128 | public void SendXferPacket(ulong xferID, uint packet, byte[] data) | 2128 | public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
2129 | { | 2129 | { |
2130 | ThrottleOutPacketType type = ThrottleOutPacketType.Asset; | ||
2131 | if (isTaskInventory) | ||
2132 | type = ThrottleOutPacketType.Task; | ||
2133 | |||
2130 | SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket); | 2134 | SendXferPacketPacket sendXfer = (SendXferPacketPacket)PacketPool.Instance.GetPacket(PacketType.SendXferPacket); |
2131 | sendXfer.XferID.ID = xferID; | 2135 | sendXfer.XferID.ID = xferID; |
2132 | sendXfer.XferID.Packet = packet; | 2136 | sendXfer.XferID.Packet = packet; |
2133 | sendXfer.DataPacket.Data = data; | 2137 | sendXfer.DataPacket.Data = data; |
2134 | OutPacket(sendXfer, ThrottleOutPacketType.Asset); | 2138 | OutPacket(sendXfer, type); |
2135 | } | 2139 | } |
2136 | 2140 | ||
2137 | public void SendAbortXferPacket(ulong xferID) | 2141 | public void SendAbortXferPacket(ulong xferID) |
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs index b8e2820..78d597d 100644 --- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs | |||
@@ -145,6 +145,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
145 | { | 145 | { |
146 | byte[] fileData = NewFiles[fileName].Data; | 146 | byte[] fileData = NewFiles[fileName].Data; |
147 | XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient); | 147 | XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient); |
148 | if (fileName.StartsWith("inventory_")) | ||
149 | transaction.isTaskInventory = true; | ||
148 | 150 | ||
149 | Transfers.Add(xferID, transaction); | 151 | Transfers.Add(xferID, transaction); |
150 | 152 | ||
@@ -228,6 +230,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
228 | public uint Packet = 0; | 230 | public uint Packet = 0; |
229 | public uint Serial = 1; | 231 | public uint Serial = 1; |
230 | public ulong XferID = 0; | 232 | public ulong XferID = 0; |
233 | public bool isTaskInventory = false; | ||
231 | 234 | ||
232 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client) | 235 | public XferDownLoad(string fileName, byte[] data, ulong xferID, IClientAPI client) |
233 | { | 236 | { |
@@ -253,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
253 | byte[] transferData = new byte[Data.Length + 4]; | 256 | byte[] transferData = new byte[Data.Length + 4]; |
254 | Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); | 257 | Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); |
255 | Array.Copy(Data, 0, transferData, 4, Data.Length); | 258 | Array.Copy(Data, 0, transferData, 4, Data.Length); |
256 | Client.SendXferPacket(XferID, 0 + 0x80000000, transferData); | 259 | Client.SendXferPacket(XferID, 0 + 0x80000000, transferData, isTaskInventory); |
257 | complete = true; | 260 | complete = true; |
258 | } | 261 | } |
259 | else | 262 | else |
@@ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
261 | byte[] transferData = new byte[1000 + 4]; | 264 | byte[] transferData = new byte[1000 + 4]; |
262 | Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); | 265 | Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4); |
263 | Array.Copy(Data, 0, transferData, 4, 1000); | 266 | Array.Copy(Data, 0, transferData, 4, 1000); |
264 | Client.SendXferPacket(XferID, 0, transferData); | 267 | Client.SendXferPacket(XferID, 0, transferData, isTaskInventory); |
265 | Packet++; | 268 | Packet++; |
266 | DataPointer = 1000; | 269 | DataPointer = 1000; |
267 | } | 270 | } |
@@ -282,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
282 | { | 285 | { |
283 | byte[] transferData = new byte[1000]; | 286 | byte[] transferData = new byte[1000]; |
284 | Array.Copy(Data, DataPointer, transferData, 0, 1000); | 287 | Array.Copy(Data, DataPointer, transferData, 0, 1000); |
285 | Client.SendXferPacket(XferID, Packet, transferData); | 288 | Client.SendXferPacket(XferID, Packet, transferData, isTaskInventory); |
286 | Packet++; | 289 | Packet++; |
287 | DataPointer += 1000; | 290 | DataPointer += 1000; |
288 | } | 291 | } |
@@ -291,7 +294,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer | |||
291 | byte[] transferData = new byte[Data.Length - DataPointer]; | 294 | byte[] transferData = new byte[Data.Length - DataPointer]; |
292 | Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); | 295 | Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); |
293 | uint endPacket = Packet |= (uint) 0x80000000; | 296 | uint endPacket = Packet |= (uint) 0x80000000; |
294 | Client.SendXferPacket(XferID, endPacket, transferData); | 297 | Client.SendXferPacket(XferID, endPacket, transferData, isTaskInventory); |
295 | Packet++; | 298 | Packet++; |
296 | DataPointer += (Data.Length - DataPointer); | 299 | DataPointer += (Data.Length - DataPointer); |
297 | 300 | ||
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 17a210b..86f33eb 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1122,7 +1122,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1122 | 1122 | ||
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | public void SendXferPacket(ulong xferID, uint packet, byte[] data) | 1125 | public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
1126 | { | 1126 | { |
1127 | 1127 | ||
1128 | } | 1128 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 97db7e1..d00a6c0 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -755,7 +755,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
755 | { | 755 | { |
756 | } | 756 | } |
757 | 757 | ||
758 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) | 758 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
759 | { | 759 | { |
760 | } | 760 | } |
761 | public virtual void SendAbortXferPacket(ulong xferID) | 761 | public virtual void SendAbortXferPacket(ulong xferID) |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index e254dd8..6add130 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -732,7 +732,7 @@ namespace OpenSim.Tests.Common.Mock | |||
732 | { | 732 | { |
733 | } | 733 | } |
734 | 734 | ||
735 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) | 735 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) |
736 | { | 736 | { |
737 | } | 737 | } |
738 | 738 | ||