From a41cd1d0695c01e4096fa0b7696b415a4c7455fc Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 13:14:29 -0700 Subject: * Unregister Mono.Addins event handlers in PluginLoader.Dispose() and always handle PluginLoader with the using pattern. This freed up 121,634,796 bytes on my system * Avoid allocating an Action object every round of the OutgoingPacketHandler * Removed unnecessary semi-colon endings from OpenSim.ini.example [InterestManagement] section --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 232c9c9..1dd58bf 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -814,6 +814,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // on to en-US to avoid number parsing issues Culture.SetCurrentCulture(); + // Typecast the function to an Action once here to avoid allocating a new + // Action generic every round + Action clientPacketHandler = ClientOutgoingPacketHandler; + while (base.IsRunning) { try @@ -862,7 +866,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Handle outgoing packets, resends, acknowledgements, and pings for each // client. m_packetSent will be set to true if a packet is sent - m_scene.ClientManager.ForEachSync(ClientOutgoingPacketHandler); + m_scene.ClientManager.ForEachSync(clientPacketHandler); // If nothing was sent, sleep for the minimum amount of time before a // token bucket could get more tokens -- cgit v1.1