From 400314e88430628bad8bda5d5c32989997e9f480 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 17 Oct 2008 20:38:00 +0000 Subject: * Finally, don't worry about doing containment checks on other dictionaries if we are adding a client * Regarding an earlier change, I think it would be possible to eliminate the creation of new IPEndPoints on every end receive if we did the client circuit lookup before starting the next receive. However, this would be a performance trade off and hence not worth trying without performance testing --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index a4a6b93..22666f4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -382,13 +382,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (!foundExistingCircuit) { // This doesn't need locking as it's synchronized data - if (!clientCircuits_reverse.ContainsKey(useCircuit.CircuitCode.Code)) - clientCircuits_reverse.Add(useCircuit.CircuitCode.Code, epSender); + clientCircuits_reverse[useCircuit.CircuitCode.Code] = epSender; lock (proxyCircuits) { - if (!proxyCircuits.ContainsKey(useCircuit.CircuitCode.Code)) - proxyCircuits.Add(useCircuit.CircuitCode.Code, epProxy); + proxyCircuits[useCircuit.CircuitCode.Code] = epProxy; } PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_circuitManager, epProxy); -- cgit v1.1