aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
diff options
context:
space:
mode:
authorDiva Canto2015-05-07 19:24:08 -0700
committerDiva Canto2015-05-07 19:24:08 -0700
commitc74cef0f4261191962959e42c7e349adafd42a04 (patch)
tree95ad098d2606b7d37a6b287816d9f6a02311860d /OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-c74cef0f4261191962959e42c7e349adafd42a04.zip
opensim-SC_OLD-c74cef0f4261191962959e42c7e349adafd42a04.tar.gz
opensim-SC_OLD-c74cef0f4261191962959e42c7e349adafd42a04.tar.bz2
opensim-SC_OLD-c74cef0f4261191962959e42c7e349adafd42a04.tar.xz
Major change in the way inventory is downloaded: added a method throughout IIventoryService that fetches sets of folders at once. Also added folder id in the InventoryCollection data structure, so that we don't need to go to inventory server again just for that. This reduces the chatter between sims and inventory server by... a lot. On my tests, this reduces initial inventory download down to 30% of what it currently is.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
index 01814a1..eb7d3a9 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
65 { 65 {
66 InventoryFolderImpl folder = null; 66 InventoryFolderImpl folder = null;
67 InventoryCollection inv = new InventoryCollection(); 67 InventoryCollection inv = new InventoryCollection();
68 inv.UserID = m_Library.Owner; 68 inv.OwnerID = m_Library.Owner;
69 69
70 if (folderID != m_Library.ID) 70 if (folderID != m_Library.ID)
71 { 71 {
@@ -87,6 +87,18 @@ namespace OpenSim.Region.CoreModules.Framework.Library
87 return inv; 87 return inv;
88 } 88 }
89 89
90 public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
91 {
92 InventoryCollection[] invColl = new InventoryCollection[folderIDs.Length];
93 int i = 0;
94 foreach (UUID fid in folderIDs)
95 {
96 invColl[i++] = GetFolderContent(principalID, fid);
97 }
98
99 return invColl;
100 }
101
90 /// <summary> 102 /// <summary>
91 /// Add a new folder to the user's inventory 103 /// Add a new folder to the user's inventory
92 /// </summary> 104 /// </summary>