* 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
This commit is contained in:
Justin Clarke Casey
2008-10-17 20:38:00 +00:00
parent 4ccac88cf6
commit 400314e884

View File

@@ -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);