aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2013-07-13 11:30:37 -0700
committerDiva Canto2013-07-13 11:30:37 -0700
commitbc405a6a349f4d2be3f79afe7e8a88738339ef1f (patch)
treee9024c7ed0afbc7a7df0f58570a4d155910dd189
parentTrying to reduce CPU usage on logins and TPs: trying radical elimination of a... (diff)
downloadopensim-SC_OLD-bc405a6a349f4d2be3f79afe7e8a88738339ef1f.zip
opensim-SC_OLD-bc405a6a349f4d2be3f79afe7e8a88738339ef1f.tar.gz
opensim-SC_OLD-bc405a6a349f4d2be3f79afe7e8a88738339ef1f.tar.bz2
opensim-SC_OLD-bc405a6a349f4d2be3f79afe7e8a88738339ef1f.tar.xz
That didn't fix the problem.
Revert "Trying to reduce CPU usage on logins and TPs: trying radical elimination of all FireAndForgets throughout CompleteMovement. There were 4." This reverts commit 682537738008746f0aca22954902f3a4dfbdc95f.
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs60
2 files changed, 38 insertions, 27 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index e7216ed..c04098c 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -173,7 +173,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
173 if(obj.PresenceType == PresenceType.Npc) 173 if(obj.PresenceType == PresenceType.Npc)
174 return; 174 return;
175 175
176 GetImageAssets(((IScenePresence)obj).UUID); 176 Util.FireAndForget(delegate
177 {
178 GetImageAssets(((IScenePresence)obj).UUID);
179 });
177 } 180 }
178 181
179 /// <summary> 182 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 4d796fe..9f8ada3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -958,7 +958,14 @@ namespace OpenSim.Region.Framework.Scenes
958 // Viewers which have a current outfit folder will actually rez their own attachments. However, 958 // Viewers which have a current outfit folder will actually rez their own attachments. However,
959 // viewers without (e.g. v1 viewers) will not, so we still need to make this call. 959 // viewers without (e.g. v1 viewers) will not, so we still need to make this call.
960 if (Scene.AttachmentsModule != null) 960 if (Scene.AttachmentsModule != null)
961 Scene.AttachmentsModule.RezAttachments(this); 961 Util.FireAndForget(
962 o =>
963 {
964// if (PresenceType != PresenceType.Npc && Util.FireAndForgetMethod != FireAndForgetMethod.None)
965// System.Threading.Thread.Sleep(7000);
966
967 Scene.AttachmentsModule.RezAttachments(this);
968 });
962 } 969 }
963 else 970 else
964 { 971 {
@@ -1355,26 +1362,25 @@ namespace OpenSim.Region.Framework.Scenes
1355 1362
1356 ValidateAndSendAppearanceAndAgentData(); 1363 ValidateAndSendAppearanceAndAgentData();
1357 1364
1358 // XXX: If we force an update here, then multiple attachments do appear correctly on a destination region
1359 // If we do it a little bit earlier (e.g. when converting the child to a root agent) then this does not work.
1360 // This may be due to viewer code or it may be something we're not doing properly simulator side.
1361 lock (m_attachments)
1362 {
1363 foreach (SceneObjectGroup sog in m_attachments)
1364 sog.ScheduleGroupForFullUpdate();
1365 }
1366
1367 // Create child agents in neighbouring regions 1365 // Create child agents in neighbouring regions
1368 if (openChildAgents && !IsChildAgent) 1366 if (openChildAgents && !IsChildAgent)
1369 { 1367 {
1368 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1369 if (m_agentTransfer != null)
1370 Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); });
1371
1370 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 1372 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1371 if (friendsModule != null) 1373 if (friendsModule != null)
1372 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); 1374 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
1375 }
1373 1376
1374 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1377 // XXX: If we force an update here, then multiple attachments do appear correctly on a destination region
1375 if (m_agentTransfer != null) 1378 // If we do it a little bit earlier (e.g. when converting the child to a root agent) then this does not work.
1376 m_agentTransfer.EnableChildAgents(this); // this can take a while... several seconds 1379 // This may be due to viewer code or it may be something we're not doing properly simulator side.
1377 1380 lock (m_attachments)
1381 {
1382 foreach (SceneObjectGroup sog in m_attachments)
1383 sog.ScheduleGroupForFullUpdate();
1378 } 1384 }
1379 1385
1380// m_log.DebugFormat( 1386// m_log.DebugFormat(
@@ -2683,20 +2689,22 @@ namespace OpenSim.Region.Framework.Scenes
2683 public void SendInitialDataToMe() 2689 public void SendInitialDataToMe()
2684 { 2690 {
2685 // Send all scene object to the new client 2691 // Send all scene object to the new client
2686 2692 Util.FireAndForget(delegate
2687 // we created a new ScenePresence (a new child agent) in a fresh region.
2688 // Request info about all the (root) agents in this region
2689 // Note: This won't send data *to* other clients in that region (children don't send)
2690 SendOtherAgentsAvatarDataToMe();
2691 SendOtherAgentsAppearanceToMe();
2692
2693 EntityBase[] entities = Scene.Entities.GetEntities();
2694 foreach (EntityBase e in entities)
2695 { 2693 {
2696 if (e != null && e is SceneObjectGroup) 2694 // we created a new ScenePresence (a new child agent) in a fresh region.
2697 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); 2695 // Request info about all the (root) agents in this region
2698 } 2696 // Note: This won't send data *to* other clients in that region (children don't send)
2697 SendOtherAgentsAvatarDataToMe();
2698 SendOtherAgentsAppearanceToMe();
2699
2700 EntityBase[] entities = Scene.Entities.GetEntities();
2701 foreach (EntityBase e in entities)
2702 {
2703 if (e != null && e is SceneObjectGroup)
2704 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
2705 }
2699 2706
2707 });
2700 } 2708 }
2701 2709
2702 /// <summary> 2710 /// <summary>