From f19816aeb91a5d31cb07fc7fb0f4419e2aad90be Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Oct 2010 21:38:26 +0100 Subject: Add number of ms it takes to complete UseCircuitCode packet handling to log for diagnostics --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index cb298fd..161e8c2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -615,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // UseCircuitCode handling if (packet.Type == PacketType.UseCircuitCode) - { - m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint); + { object[] array = new object[] { buffer, packet }; if (m_asyncPacketHandling) @@ -827,9 +826,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void HandleUseCircuitCode(object o) { + DateTime startTime = DateTime.Now; object[] array = (object[])o; UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; + + m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; @@ -838,6 +840,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Acknowledge the UseCircuitCode packet SendAckImmediate(remoteEndPoint, packet.Header.Sequence); + + m_log.DebugFormat( + "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", + buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); } private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) -- cgit v1.1 From 818ed2032aa4e6c0a9ede3598d64f0c7960135c4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 00:41:36 +0100 Subject: READ CAREFULLY!!! This is a BROKEN commit. It is UNTESTED and INCOMPLETE. It contains a major interface version bump and will NOT work with earlier grid services. This is preliminary work that will lead to layers support. Rest appearance services are commented out completely, they will have to be adapted by someone who actually uses them. Remote admin is working, but has no layers support. There is no layers support in the database. Login likely won't work. You have been warned. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 14f923d..d7458b7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP aw.AgentData.SerialNum = (uint)serial; aw.AgentData.SessionID = m_sessionId; + int count = 0; + for (int i = 0; i < wearables.Length; i++) + count += wearables[i].Count; + // TODO: don't create new blocks if recycling an old packet - aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; + aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; AgentWearablesUpdatePacket.WearableDataBlock awb; + int idx = 0; for (int i = 0; i < wearables.Length; i++) { - awb = new AgentWearablesUpdatePacket.WearableDataBlock(); - awb.WearableType = (byte)i; - awb.AssetID = wearables[i].AssetID; - awb.ItemID = wearables[i].ItemID; - aw.WearableData[i] = awb; + for (int j = 0; j < wearables[i].Count; j++) + { + awb = new AgentWearablesUpdatePacket.WearableDataBlock(); + awb.WearableType = (byte)i; + awb.AssetID = wearables[i][j].AssetID; + awb.ItemID = wearables[i][j].ItemID; + aw.WearableData[idx] = awb; + idx++; // m_log.DebugFormat( // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", // awb.ItemID, awb.AssetID, i, Name); + } } OutPacket(aw, ThrottleOutPacketType.Task); -- cgit v1.1 From 343c89465891234be94da33719dcbdd903993a42 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 30 Oct 2010 01:35:12 +0100 Subject: Set async_packet_handling = true by default Setting this to true avoids a 500ms or so client freeze when the LLUDP server thread is taken up with processing a UseCircuitCode packet synchronously. Extensive testing on Wright Plaza appeared to show no bad effects and this seems to reduce login lag considerably. Of course, a lot of login lag is still coming from other sources. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 161e8c2..821f679 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP IConfig config = configSource.Configs["ClientStack.LindenUDP"]; if (config != null) { - m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false); + m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true); m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); -- cgit v1.1 From e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 19:06:47 +0100 Subject: Fix logins and avatar appearance. Contains a Migration. May contain nuts. This will cause visual params to be persisted along with worn items. With this, alpha and tattoo laters will be saved. Multiple layers MAY work, but not tested because I don't use Viewer 2. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d7458b7..4aa19d1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5734,6 +5734,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); for (int i = 0; i < nowWearing.WearableData.Length; i++) { + m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID); AvatarWearingArgs.Wearable wearable = new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, nowWearing.WearableData[i].WearableType); -- cgit v1.1