aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-01 21:25:40 +0100
committerJustin Clark-Casey (justincc)2011-07-01 21:25:40 +0100
commit9f72fbcb7533bd960c38082cbd6956cd01fa6919 (patch)
tree3f2da22ae0a05d76753ab25ae3849ef66b25ccb6 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-9f72fbcb7533bd960c38082cbd6956cd01fa6919.zip
opensim-SC-9f72fbcb7533bd960c38082cbd6956cd01fa6919.tar.gz
opensim-SC-9f72fbcb7533bd960c38082cbd6956cd01fa6919.tar.bz2
opensim-SC-9f72fbcb7533bd960c38082cbd6956cd01fa6919.tar.xz
Add an async inventory details sender to respond to FetchInventory packets.
If a user with a very large inventory right-clicks on their "My Inventory" folder, viewer 1 code will send a massive number of Fetchinventory requests. Even though each is handled asynchronously via a pool thread, the sheer frequency of requests overwhelms the pool and freezes inbound packet handling. This change makes the first Fetchinventory thread also handle subsequent requests, freeing up the other threads. Further efficiencies could be made by handling all the items in a particular FetchInventory request together, rather than separately.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ad41e88..eeb881f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -583,6 +583,8 @@ namespace OpenSim.Region.Framework.Scenes
583 m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); 583 m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
584 m_asyncSceneObjectDeleter.Enabled = true; 584 m_asyncSceneObjectDeleter.Enabled = true;
585 585
586 m_asyncInventorySender = new AsyncInventorySender(this);
587
586 #region Region Settings 588 #region Region Settings
587 589
588 // Load region settings 590 // Load region settings
@@ -2760,14 +2762,13 @@ namespace OpenSim.Region.Framework.Scenes
2760 2762
2761 public virtual void SubscribeToClientInventoryEvents(IClientAPI client) 2763 public virtual void SubscribeToClientInventoryEvents(IClientAPI client)
2762 { 2764 {
2763
2764 client.OnLinkInventoryItem += HandleLinkInventoryItem; 2765 client.OnLinkInventoryItem += HandleLinkInventoryItem;
2765 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder; 2766 client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder;
2766 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder; 2767 client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder;
2767 client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!! 2768 client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!!
2768 client.OnFetchInventoryDescendents += HandleFetchInventoryDescendents; 2769 client.OnFetchInventoryDescendents += HandleFetchInventoryDescendents;
2769 client.OnPurgeInventoryDescendents += HandlePurgeInventoryDescendents; // 2; //!! 2770 client.OnPurgeInventoryDescendents += HandlePurgeInventoryDescendents; // 2; //!!
2770 client.OnFetchInventory += HandleFetchInventory; 2771 client.OnFetchInventory += m_asyncInventorySender.HandleFetchInventory;
2771 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 2772 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
2772 client.OnCopyInventoryItem += CopyInventoryItem; 2773 client.OnCopyInventoryItem += CopyInventoryItem;
2773 client.OnMoveInventoryItem += MoveInventoryItem; 2774 client.OnMoveInventoryItem += MoveInventoryItem;