mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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.
This commit is contained in:
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
|
||||
{
|
||||
InventoryFolderImpl folder = null;
|
||||
InventoryCollection inv = new InventoryCollection();
|
||||
inv.UserID = m_Library.Owner;
|
||||
inv.OwnerID = m_Library.Owner;
|
||||
|
||||
if (folderID != m_Library.ID)
|
||||
{
|
||||
@@ -87,6 +87,18 @@ namespace OpenSim.Region.CoreModules.Framework.Library
|
||||
return inv;
|
||||
}
|
||||
|
||||
public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
|
||||
{
|
||||
InventoryCollection[] invColl = new InventoryCollection[folderIDs.Length];
|
||||
int i = 0;
|
||||
foreach (UUID fid in folderIDs)
|
||||
{
|
||||
invColl[i++] = GetFolderContent(principalID, fid);
|
||||
}
|
||||
|
||||
return invColl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a new folder to the user's inventory
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user