More on mantis #7567. Two things:

- Increase the inventory cache timeout to 20 secs, so that the items will still be there when they are needed by the sim for rezzing
- Before rezzing attachs, make a call to GetMultipleItems so to fetch them all at the same time
fsassets
Diva Canto 2015-06-05 10:07:50 -07:00
parent cc22d81b4d
commit 96f0c6f074
2 changed files with 12 additions and 2 deletions

View File

@ -304,6 +304,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name);
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
// Let's get all items at once, so they get cached
UUID[] items = new UUID[attachments.Count];
int i = 0;
foreach (AvatarAttachment attach in attachments)
items[i++] = attach.ItemID;
m_scene.InventoryService.GetMultipleItems(sp.UUID, items);
foreach (AvatarAttachment attach in attachments)
{
uint attachmentPt = (uint)attach.AttachPoint;

View File

@ -62,7 +62,7 @@ namespace OpenSim.Services.Connectors
/// </remarks>
private int m_requestTimeoutSecs = -1;
private const double CACHE_EXPIRATION_SECONDS = 8.0;
private const double CACHE_EXPIRATION_SECONDS = 20.0;
private static ExpiringCache<UUID, InventoryItemBase> m_ItemCache = new ExpiringCache<UUID,InventoryItemBase>();
public XInventoryServicesConnector()
@ -244,7 +244,7 @@ namespace OpenSim.Services.Connectors
public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs)
{
InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length];
//m_log.DebugFormat("[XXX]: In GetMultipleFoldersContent {0}", folderIDs.Length);
// m_log.DebugFormat("[XXX]: In GetMultipleFoldersContent {0}", String.Join(",", folderIDs));
try
{
Dictionary<string, object> resultSet = MakeRequest("GETMULTIPLEFOLDERSCONTENT",
@ -544,6 +544,8 @@ namespace OpenSim.Services.Connectors
public virtual InventoryItemBase[] GetMultipleItems(UUID principalID, UUID[] itemIDs)
{
//m_log.DebugFormat("[XXX]: In GetMultipleItems {0}", String.Join(",", itemIDs));
InventoryItemBase[] itemArr = new InventoryItemBase[itemIDs.Length];
// Try to get them from the cache
List<UUID> pending = new List<UUID>();