diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 83cf90489a..0522814101 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -2142,7 +2142,6 @@ namespace OpenSim.Framework.Servers.HttpServer { HTTPDRunning = false; - StatsManager.DeregisterStat(m_requestsProcessedStat); try diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 1f779cef3f..059a7050b3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -466,7 +466,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_circuitManager = circuitManager; int sceneThrottleBps = 0; - bool usePools = false; +// bool usePools = false; IConfig config = configSource.Configs["ClientStack.LindenUDP"]; if (config != null) @@ -497,8 +497,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (packetConfig != null) { PacketPool.Instance.RecyclePackets = packetConfig.GetBoolean("RecyclePackets", true); - PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true); - usePools = packetConfig.GetBoolean("RecycleBaseUDPPackets", usePools); +// PacketPool.Instance.RecycleDataBlocks = packetConfig.GetBoolean("RecycleDataBlocks", true); +// usePools = packetConfig.GetBoolean("RecycleBaseUDPPackets", usePools); } #region BinaryStats @@ -896,7 +896,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) { // CoarseLocationUpdate packets cannot be split in an automated way - if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting) + if (allowSplitting && packet.Type == PacketType.CoarseLocationUpdate) allowSplitting = false; // bool packetQueued = false; @@ -1055,7 +1055,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendPing(LLUDPClient udpClient) { StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); - pc.Header.Reliable = false; pc.PingID.PingID = (byte)udpClient.CurrentPingSequence++; // We *could* get OldestUnacked, but it would hurt performance and not provide any benefit @@ -1963,7 +1962,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); - client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); client.OnLogout += LogoutHandler; client.DebugPacketLevel = DefaultClientPacketDebugLevel; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index f585bea3c6..9b94a29ed6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs @@ -105,7 +105,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // defaults RecyclePackets = true; - RecycleDataBlocks = true; + // RecycleDataBlocks = true; + RecycleDataBlocks = false; } /// @@ -198,60 +199,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void ReturnPacket(Packet packet) { - if (RecycleDataBlocks) - { - switch (packet.Type) - { - case PacketType.ObjectUpdate: - ObjectUpdatePacket oup = (ObjectUpdatePacket)packet; + if (!RecyclePackets) + return; + bool trypool = false; + PacketType type = packet.Type; + + switch (type) + { + case PacketType.ObjectUpdate: + ObjectUpdatePacket oup = (ObjectUpdatePacket)packet; + + if (RecycleDataBlocks) + { foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData) ReturnDataBlock(oupod); + } - oup.ObjectData = null; - break; + oup.ObjectData = null; + trypool = true; + break; - case PacketType.ImprovedTerseObjectUpdate: - ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet; + case PacketType.ImprovedTerseObjectUpdate: + ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet; + if (RecycleDataBlocks) + { foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData) ReturnDataBlock(itoupod); + } - itoup.ObjectData = null; - break; - } + itoup.ObjectData = null; + trypool = true; + break; + + case PacketType.AgentUpdate: + case PacketType.PacketAck: + trypool = true; + break; + default: + return; } - if (RecyclePackets) + if(!trypool) + return; + + lock (pool) { - switch (packet.Type) + if (!pool.ContainsKey(type)) { - // List pooling packets here - case PacketType.AgentUpdate: - case PacketType.PacketAck: - case PacketType.ObjectUpdate: - case PacketType.ImprovedTerseObjectUpdate: - lock (pool) - { - PacketType type = packet.Type; + pool[type] = new Stack(); + } - if (!pool.ContainsKey(type)) - { - pool[type] = new Stack(); - } - - if ((pool[type]).Count < 50) - { -// m_log.DebugFormat("[PACKETPOOL]: Pushing {0} packet", type); - - pool[type].Push(packet); - } - } - break; - - // Other packets wont pool - default: - return; + if ((pool[type]).Count < 50) + { +// m_log.DebugFormat("[PACKETPOOL]: Pushing {0} packet", type); + pool[type].Push(packet); } } }