aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid
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/Services/Connectors/SimianGrid
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-c74cef0f4261191962959e42c7e349adafd42a04.zip
opensim-SC-c74cef0f4261191962959e42c7e349adafd42a04.tar.gz
opensim-SC-c74cef0f4261191962959e42c7e349adafd42a04.tar.bz2
opensim-SC-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/Services/Connectors/SimianGrid')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 9ded1c4..0331c66 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -340,7 +340,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
340 public InventoryCollection GetFolderContent(UUID userID, UUID folderID) 340 public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
341 { 341 {
342 InventoryCollection inventory = new InventoryCollection(); 342 InventoryCollection inventory = new InventoryCollection();
343 inventory.UserID = userID; 343 inventory.OwnerID = userID;
344 344
345 NameValueCollection requestArgs = new NameValueCollection 345 NameValueCollection requestArgs = new NameValueCollection
346 { 346 {
@@ -371,6 +371,18 @@ namespace OpenSim.Services.Connectors.SimianGrid
371 return inventory; 371 return inventory;
372 } 372 }
373 373
374 public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
375 {
376 InventoryCollection[] invColl = new InventoryCollection[folderIDs.Length];
377 int i = 0;
378 foreach (UUID fid in folderIDs)
379 {
380 invColl[i++] = GetFolderContent(principalID, fid);
381 }
382
383 return invColl;
384 }
385
374 /// <summary> 386 /// <summary>
375 /// Gets the items inside a folder 387 /// Gets the items inside a folder
376 /// </summary> 388 /// </summary>
@@ -380,7 +392,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
380 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) 392 public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
381 { 393 {
382 InventoryCollection inventory = new InventoryCollection(); 394 InventoryCollection inventory = new InventoryCollection();
383 inventory.UserID = userID; 395 inventory.OwnerID = userID;
384 396
385 NameValueCollection requestArgs = new NameValueCollection 397 NameValueCollection requestArgs = new NameValueCollection
386 { 398 {